Class: JsonApiUnwrapper

Inherits:
Object
  • Object
show all
Defined in:
lib/jsonapi-unwrapper.rb

Class Method Summary collapse

Class Method Details

.call(json) ⇒ Object



2
3
4
5
6
7
# File 'lib/jsonapi-unwrapper.rb', line 2

def self.call(json)
  data = json["data"]
  included = json["included"] || {}

  return JsonApiUnwrapper.deserilize_entity(data, included)
end