methopara
is a gem that enables us to use Method#parameters
And this time, I added an interface to use it for UnboundMet
1 require 'rubygems' 2 require 'methopara' 3 4 class Foo 5 def foo(a,b) end 6 end 7 Foo.instance_method(:foo).parameters 8 #=> [[:req, :a], [:req, :b]]
Enjoy!
posted by
takiuchi
on Wed 11 Feb 2009
at 16:26