- 701 名前:デフォルトの名無しさん mailto:sage [2008/02/08(金) 21:09:55 ]
- マニュアルにある通り、「上」のクラスのサブクラスかインスタンスメソッドにしないと読めないぞ
モジュールを継承することはできないからincludeする。…できないはず。まあいいや。 module Test @@temp = "test" class TestTest include Test # def initialize # @@temp = "test2" # end def print puts @@temp end end end Test::TestTest.new.print 個人的にはあまりきれいに思えない
|

|