From: "trans. (T. Onoma)" Date: 2004-09-11T04:51:50+09:00 Subject: Re: Names for these setting helper methods On Friday 10 September 2004 10:15 am, Markus wrote: > In my code I call the first one (or rather, its analog, which takes a > hash) "Object#absorb" and would probably call the second one something > like "Object#soak_in". Hmm... you give me idea! class Object def vulcan_mind_meld(field_values) field_values.each_pair { |k,v| if k.to_s[0..0] == '@' self.instance_variable_set( k,v ) else self.send( "#@{k}=", v ) } end end end WARNING: ABOVE CODE TYPED FROM MEMORY WITH A TODDLER'S HELP Thanks MarkusQ! T. -- ( o _ // trans. / \ transami@runbox.com I don't give a damn for a man that can only spell a word one way. -Mark Twain