11th Wed
methopara-0.3.0 Released
methopara
is a gem that enables us to use Method#parameters with Ruby-1.9.1.
It was originally made by @ko1_twitter, the creater of YARV, at the previous meet-up of asakusa.rb.
And this time, I added an interface to use it for UnboundMethod.
Now you can use UnboundMethod#parameters with new methopara, like this.
ruby>>
require 'rubygems'
require 'methopara'
class Foo
def foo(a,b) end
end
Foo.instance_method(:foo).parameters
#=> [[:req, :a], [:req, :b]]
<<--
Enjoy!
posted by
takiuchi on Wed 11 Feb 2009 at 16:18 with 0 comments