I have an object created, and I want, based on some conditional check, to add some attributes to this object. How can I do this? To explain what I want:
A=O
This adds the attribute to only the object:
a = Object.new if (something happens) class << a attr_accessor :age end a.age = new_age_value end