class JSONAPI::Ruby::Deserializer::Relationships
Attributes
to_a[RW]
Public Class Methods
new(data)
click to toggle source
# File lib/jsonapi-ruby-deserializer/relationships.rb, line 12 def initialize(data) @to_a = [] data.map do |key, h| @to_a << key self.class.send(:attr_accessor, key) instance_variable_set("@#{key}", Document.new(h)) end end