Let's say I have the following hash:
{ :foo => 'bar', :baz => 'qux' }
How could I dynamically set the keys and values to become instance variables in an object...
class Example
def initialize( hash )
... magic happens here...
end
end
... so that I end up with the following inside the model...
@foo = 'bar'
@baz = 'qux'
?