• 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28

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.

   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 Png takiuchi on Wed 11 Feb 2009 at 16:26
Contents
methopara-0.3.0 Released
Comments
Spencer: You don't have to re-compile it, this version w... '14-4
staiano: Any chance we can get a recompile for 10.9? '14-1
falsefalse: @tiancongxin try using this one https://github.... '12-2
tiancongxin: TerminalCopyOnSelect not work on OS X 'Lion' , ... '11-7
staiano: Roderick you rock for recompiling it. Thanks. '11-3
Services from s21g
twpro(ツイプロ)
Twitterプロフィールを快適検索
地価2009
土地の値段を調べてみよう
MyRestaurant
自分だけのレストラン手帳
Formula
ブログに数式を埋め込める数式コミュニティ