Yesterday (Feb 10, 2009),
asakusa.rb
took place at Akihabara, Tokyo.
asakusa.rb is a rubyist community that is based on Asakusa.

In the monthly meet-up of that community,
@ko1_twitter wrote a code snippet.
This snippet is a kind of backport of Method#parameters for Ruby-1.9.1.
His quick job led a way for merbists to change merb to be corresponding to Ruby-1.9.1.
He named his work "methopara". It stands for METHOd PARAmeters.

And I made it as a gem
for ease of use.
Now we can use it by the command below.

pre>>
% sudo gem install methopara --source http://merbi.st
<<--

Usage is as follows.

ruby>>

require "rubygems"
require "methopara"
def foo(a,b=nil,&c) end
method(:foo).parameters
=> [[:req, :a], [:opt, :b], [:block, :c]]
<<--

This gem is only for Ruby-1.9.1.
Because Ruby18x have merb-action-args, and Ruby-1.9.2 and its successors will have built-in Method#parameters.

Enjoy!

See Also

posted by genki genki on Wed 11 Feb 2009 at 10:04 with 1 comment
rogerdpack rogerdpack 07/17 21:31
Thanks for doing that
Contents rssrss
光ファイバーを二次元振動させて走査するAR用ディスプレイ
因果の取り違え
Swift2's defer for CoffeeScript
mongodb-3.0からcreateIndexのdropDupsが無くなったらしい
mongodb-3.0以降のWiredTigerの設定を動的に変更する方法
一般楕円の高速生成アルゴリズムへの道標
farro mantecatoのレシピ
Droonga関連の記事のまとめ
RuntimeErrorの特定のメッセージに限定してrescueする方法
jQueryでscriptタグを実行せずにappendする
Tags
coffeescriptdefergroongajsmemonodenodejs
Comments rssrss
https://xn--mgmrket6-px0d.com https://xn--mgmrket6-px0d.com: Регулярная проверка настроек MEGA: как обезопаси... 04/24 09:44
https://fromkorea.peoplead.kr/bbs/board.php?bo_table=free&wr_id=72875 https://fromkorea.peoplead.kr/bbs/board.php?bo_table=free&wr_id=72875: Nice blog. I liked reading. Many thanks for the in... 04/24 06:13
https://Xn--Mgmarkt8-9DB.Com/ https://Xn--Mgmarkt8-9DB.Com/: Что выбрать: Tor или VPN для безопасного MEGA? ... 04/24 01:57
https://buy-property-uae.com/ https://buy-property-uae.com/: Real estate experts are convinced, that buying pro... 04/24 00:16
https://buy-property-uae.com/ https://buy-property-uae.com/: Real estate experts are convinced, that acquiring ... 04/24 00:16
https://xn--mgmarkt9-9db.com https://xn--mgmarkt9-9db.com: Как проверить целостность ссылок MEGA: защита от ... 04/23 22:08
https://xn--mgmarkt6-9db.com https://xn--mgmarkt6-9db.com: Как обезопасить хранилище криптовалюты: сравнение... 04/23 20:02
https://www.lifnest.com/author/bradwhiddon136/ https://www.lifnest.com/author/bradwhiddon136/: Лучший bulk index checker из тех, что я пробовал... 04/23 10:21