Method: SimpleModel::Attributes#set
- Defined in:
- lib/simple_model/attributes.rb
#set(*attrs) ⇒ Object Also known as: set_attributes
Accepts a hash where the keys are methods and the values are values to be set. set(:foo => “bar”, :dime => 0.1)
58 59 60 61 62 |
# File 'lib/simple_model/attributes.rb', line 58 def set(*attrs) attrs..each do |attr,val| send("#{attr}=",val) end end |