From: Marcin Tyman Date: 2008-04-29T19:01:35+09:00 Subject: Mixins Hi guys!!! My question is: Is any way to define variables in module which can be further used in mixin? The problem is that module I wanted to include into class has constant variables defined which are used within function it implements. I'm looking for simplest way to overwrite the variables from the class (may change the variables to non constant ones) the same meaning not to change implementation of functions from the module. See: module Mod AnyVar = 10 def func #the method use AnyVar end end class MyClass include Mod def initialize #read configuration #how to make the function use new AnyVar value without changing its implementation and parameters list func() end end Thanks a lot for any ideas. -- Posted via http://www.ruby-forum.com/.