Module: Arguments
- Defined in:
- lib/__arguments__.rb,
lib/__arguments__/version.rb
Constant Summary collapse
- VERSION =
'0.1.1'
Instance Method Summary collapse
-
#__arguments__(bdg) ⇒ Array
Returns an array indicating the arguments given tothe current method.
Instance Method Details
#__arguments__(bdg) ⇒ Array
Returns an array indicating the arguments given tothe current method.
6 7 8 9 |
# File 'lib/__arguments__.rb', line 6 def __arguments__(bdg) method_symbol = caller(1,1).first.match(/\`(?<name>[^']*)'/)[:name].to_sym self.method(method_symbol).parameters.map { |e| [e[1], bdg.local_variable_get(e[1])] } end |