Module: Roar::JSON::JSONAPI::Document::Collection

Includes:
Roar::JSON::JSONAPI::Document
Defined in:
lib/roar/json/json_api.rb

Instance Method Summary collapse

Instance Method Details

#from_hash(hash, options = {}) ⇒ Object



210
211
212
213
# File 'lib/roar/json/json_api.rb', line 210

def from_hash(hash, options={})
  hash = from_document(hash)
  super(hash, options.merge(:only_body => true))
end

#to_hash(options = {}) ⇒ Object



205
206
207
208
# File 'lib/roar/json/json_api.rb', line 205

def to_hash(options={})
  res = super(options.merge(:only_body => true))
  to_document(res, options)
end