Module: Summon::Schema::InstanceMethods

Defined in:
lib/summon/schema.rb

Instance Method Summary collapse

Instance Method Details

#to_json(*a) ⇒ Object



62
63
64
65
66
# File 'lib/summon/schema.rb', line 62

def to_json(*a)
  self.class.attrs.inject({}) do |json, attr|
    json.merge attr.name => self.send(attr.name)
  end.to_json(*a)        
end