From: "Paul A." Date: 2010-04-30T22:32:59+09:00 Subject: Re: Switching dynamically between methods (inside modules) Impressive code, thanks Rick Denatale! Thank you too, Robert Dober! I am currently reading your solutions. Anyway, I don't know if delegation is the best option for my needs. Actually, if for instance we update Person class such as: class Person attr_accessor :name def initialize(language = nil) self.current_language = language end def method_missing(word, *args) @language_center.send(word) end def current_language=(language) @language_center = Language.knowledge_for(language) end def quit self.current_language = nil end end ...and English hash like this: module Language English = { :hello => "Hello! My name is #{@name}.", :bye => "Bye. (in English language)" } # ... } ...then it's hard to access instance variables (and instance methods) from person object: person = Person.new person.name = "Paul" person.current_language = :English person.hello # => "Hello! My name is ." Maybe only inheritance can do it, no? It's tricky :s Best regards. P. -- Posted via http://www.ruby-forum.com/.