T
T. Onoma
Can anyone think of better names for these?
class Object
def instance_from(f, *msgs)
msgs.each { |m| self.instance_variable_set( "@#{m}", f.send(m) ) }
end
def set_from(f, *msgs)
msgs.each { |m| self.send( "#{m=}", f.send(m) ) }
end
end
class Object
def instance_from(f, *msgs)
msgs.each { |m| self.instance_variable_set( "@#{m}", f.send(m) ) }
end
def set_from(f, *msgs)
msgs.each { |m| self.send( "#{m=}", f.send(m) ) }
end
end