KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I'm looking for a elegant way to assign the value stored inside an Hash into a pre-existed object. Just to be clear, if I have an object, say obj with two attributes, say name and age, I want to assign this values coming from an hash without do something like: obj.name = hash[:name] obj.age = hash[:age] Thanks for your attention. Simone
Tags (comma-separated)
Save Edits
Cancel