Module: OttomanORM::Representation
- Included in:
- Model
- Defined in:
- lib/ottoman_orm/representation.rb
Instance Method Summary collapse
Instance Method Details
#to_hash ⇒ Object
3 4 5 6 7 8 9 |
# File 'lib/ottoman_orm/representation.rb', line 3 def to_hash pairs = {} attributes.each do |attribute| pairs[attribute] = send(attribute) end pairs end |
#to_json ⇒ Object
11 12 13 |
# File 'lib/ottoman_orm/representation.rb', line 11 def to_json self.to_hash.to_json end |