Class: Proc

Inherits:
Object show all
Defined in:
lib/scruby/core_ext/proc.rb

Instance Method Summary collapse

Instance Method Details

#argumentsObject



3
4
5
6
7
8
9
# File 'lib/scruby/core_ext/proc.rb', line 3

def arguments
  case self.arity
  when -1..0 then []
  when 1 then self.to_sexp.assoc( :dasgn_curr )[1].to_array
  else self.to_sexp[2][1][1..-1].collect{ |arg| arg[1]  }
  end
end