2013-01-08から1日間の記事一覧
(Ruby1.9.3) #クラスメソッド class Foo def self.bar p "foobar" end end Foo.bar #=> "foobar" #特異クラス class Hoge class << self def fuga p "hogefuga" end end end Hoge.fuga #=> "hogefuga"
牌語備忘録 -pygo
(Ruby1.9.3) #クラスメソッド class Foo def self.bar p "foobar" end end Foo.bar #=> "foobar" #特異クラス class Hoge class << self def fuga p "hogefuga" end end end Hoge.fuga #=> "hogefuga"