Class: Rafflesia::ObjectHashData

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/rafflesia/objects/object_hash_data.rb

Constant Summary collapse

HASH_ATTRS =
{
  object: :object
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ ObjectHashData

Returns a new instance of ObjectHashData.



14
15
16
17
18
# File 'lib/rafflesia/objects/object_hash_data.rb', line 14

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @object = hash[:object] ? Rafflesia::ObjectRef.new(hash[:object]) : nil
end

Instance Attribute Details

#objectObject

Returns the value of attribute object.



12
13
14
# File 'lib/rafflesia/objects/object_hash_data.rb', line 12

def object
  @object
end