dara日記 RSSフィード

2009-11-20

[]"g" is very useful. How about "tapg?"

jugyo is the author of "g." He gave us cool LT on RubyConf2009.

See his slides for detail available at slideshare.

To use "g", you just do

  gem install g

then you can

  require 'rubygems'
  require 'g'

  g [1,2,3]

Growl fires. Great!


I've made "tapg", the "tapp" for "g."

With "tapg", you can "g" in the middle of a method chain.

irb(main):022:0> [1,2,3].reverse.tapg.reverse
=> [1, 2, 3]

and growl says "[3,2,1]"

Happy "g" life!

スパム対策のためのダミーです。もし見えても何も入力しないでください
ゲスト


画像認証

トラックバック - http://d.hatena.ne.jp/darashi/20091120/1258748817