From: nobu.nakada@... Date: 2001-05-31T00:00:38+09:00 Subject: [ruby-list:29904] Re: module::method() と methid() の違いは ? なかだです。 At Wed, 30 May 2001 19:39:42 +0900, 岡 保嗣 wrote: > CntAcc::init_cnt(sock) # (A) > send_apmsg("ajaaja\n") # (B) (A) と (B) ではレシーバが違うからです。 module Foo def foo; p self; end end include Foo # Foo(クラスオブジェクト) Foo::foo # main(トップレベルの self) foo クラス変数を使うのはどうでしょうか。 module CntAcc def init_cnt(line) @@target = Control.new(line) end def send_apmsg(msg) @@target.send_msg(msg) end end -- --- 僕の前にBugはない。 --- 僕の後ろにBugはできる。 中田 伸悦