Entries from 2014-09-22 to 1 day

Rubyのブロックを使うヘ(^o^)ノ

こんなメソッドを作ってみる User = Struct.new(:name) user = User.new("murajun1978") def hello(name) "Hello, #{name}" end hello(user.name) # => "Hello, murajun1978" よくある感じ んじゃ、ブロックを使ってみよう User = Struct.new(:name) user = …