Method: Jsonify::Builder#attributes!
- Defined in:
- lib/jsonify/builder.rb
#attributes!(object, *attrs) ⇒ Object
Adds a new JsonPair for each attribute in attrs by taking attr as key and value of that attribute in object.
63 64 65 66 67 |
# File 'lib/jsonify/builder.rb', line 63 def attributes!(object, *attrs) attrs.each do |attr| method_missing attr, object.send(attr) end end |