No commit activity in last 3 years
No release in over 3 years
Access list of arguments passed to the current method
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
~> 3.0
 Project Readme

Build Status Gem Version

method-arguments

Obtain arguments passed to the current Ruby method and their values in a single call

This is most likely to be useful when logging debugging information.

Usage

require '__arguments__'

class Foo
  include Arguments

  def method1(required_arg, optional_arg="optional", required_kw_arg:, optional_kw_arg: "optional_kw")
    __arguments__(binding)
  end
end

Foo.new.method1("foo", "opt2", required_kw_arg: "required") # => [[:required_arg, "foo"], [:optional_arg, "opt2"], [:required_kw_arg, "required"], [:optional_kw_arg, "optional_kw"]]