Class: Rafflesia::ObjectHashData
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::ObjectHashData
- Defined in:
- lib/rafflesia/objects/object_hash_data.rb
Constant Summary collapse
- HASH_ATTRS =
{ object: :object }.freeze
Instance Attribute Summary collapse
-
#object ⇒ Object
Returns the value of attribute object.
Instance Method Summary collapse
-
#initialize(json) ⇒ ObjectHashData
constructor
A new instance of ObjectHashData.
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
#object ⇒ Object
Returns the value of attribute object.
12 13 14 |
# File 'lib/rafflesia/objects/object_hash_data.rb', line 12 def object @object end |