Class: JSONAPI::Consumer::MetaData

Inherits:
Object
  • Object
show all
Includes:
Helpers::DynamicAttributes
Defined in:
lib/jsonapi/consumer/meta_data.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Helpers::DynamicAttributes

#[], #[]=, #attributes, #attributes=, #has_attribute?, #respond_to_missing?

Constructor Details

#initialize(data, record_class = nil) ⇒ MetaData

Returns a new instance of MetaData.



7
8
9
10
# File 'lib/jsonapi/consumer/meta_data.rb', line 7

def initialize(data, record_class = nil)
  self.record_class = record_class
  self.attributes = data
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class JSONAPI::Consumer::Helpers::DynamicAttributes

Instance Attribute Details

#record_classObject

Returns the value of attribute record_class.



5
6
7
# File 'lib/jsonapi/consumer/meta_data.rb', line 5

def record_class
  @record_class
end