Ruby初心者スレッドPart5
■ このスレッドは過去ログ倉庫に格納されています
0433デフォルトの名無しさん
2006/04/20(木) 20:01:26どうしたらいいのでしょうか。
具体的には,以下のスクリプトでbar!と表示したいのですが…
module Foo
class Yeah
def initialize
Foo.hello
end
end
def hello
puts 'Foo!'
end
module_function :hello
end
module Bar
include Foo
def hello
puts 'Bar!'
end
module_function :hello
end
foo = Bar::Yeah.new
■ このスレッドは過去ログ倉庫に格納されています