From: Rob Biedenharn Date: 2008-03-13T01:39:08+09:00 Subject: Re: including general variables in modules On Mar 12, 2008, at 12:17 PM, Mario Ruiz wrote: > But I need it. :( > > Rob Biedenharn wrote: >> On Mar 12, 2008, at 11:49 AM, Mario Ruiz wrote: >> >>> $bab="hiddenmodulevalue" >>> ... >>> Thanks. >> Uh, stop using global variables? >> >> -Rob Do you really? Perhaps you can describe your "need" and get a better answer, but why not something like: ==> scenarios.rb <== module Scenarios module Default def bab; "defaultmodulevalue"; end end module DefaultHidden def bab; "hiddenmodulevalue"; end end module DefaultSecond def bab; "secondmodulevalue"; end end end __END__ ==> these.rb <== require 'scenarios' class ThisOne include Scenarios::Default end class ThatOne include Scenarios::DefaultSecond end puts "ThisOne has #{ThisOne.new.bab}" puts "ThatOne has #{ThatOne.new.bab}" __END__ -Rob Rob Biedenharn http://agileconsultingllc.com Rob@AgileConsultingLLC.com