Class: Moon::Response::JSON::Model

Inherits:
Moon::Response::JSON show all
Defined in:
lib/moon/response/json/model.rb

Overview

Moon::Response::JSON::Collection provides a response that contains one single collection.

Instance Attribute Summary

Attributes inherited from Moon::Response::JSON

#status

Instance Method Summary collapse

Methods inherited from Moon::Response::JSON

#body, #headers

Methods inherited from Base

#body, #headers, #status

Constructor Details

#initialize(key, object, formatters) ⇒ Model

Returns a new instance of Model.



5
6
7
8
# File 'lib/moon/response/json/model.rb', line 5

def initialize(key, object, formatters)
  @key, @object, @formatters = key, object, formatters
  super 200, hash
end