Method: Cosmos::Model#as_json

Defined in:
lib/cosmos/models/model.rb

#as_jsonHash

Returns JSON encoding of this model.

Returns:

  • (Hash)

    JSON encoding of this model



178
179
180
181
182
183
# File 'lib/cosmos/models/model.rb', line 178

def as_json
  { 'name' => @name,
    'updated_at' => @updated_at,
    'plugin' => @plugin,
    'scope' => @scope }
end