module OttomanORM::Representation

Public Instance Methods

to_hash() click to toggle source
# 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() click to toggle source
# File lib/ottoman_orm/representation.rb, line 11
def to_json
    self.to_hash.to_json
end