Class: Rafflesia::ObjectJsonSelection
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::ObjectJsonSelection
- Defined in:
- lib/rafflesia/objects/object_json_selection.rb
Constant Summary collapse
- HASH_ATTRS =
{ child_count: :child_count, path: :path, type: :type, value: :value, value_preview: :value_preview }.freeze
Instance Attribute Summary collapse
-
#child_count ⇒ Object
Returns the value of attribute child_count.
-
#path ⇒ Object
Returns the value of attribute path.
-
#type ⇒ Object
Returns the value of attribute type.
-
#value ⇒ Object
Returns the value of attribute value.
-
#value_preview ⇒ Object
Returns the value of attribute value_preview.
Instance Method Summary collapse
-
#initialize(json) ⇒ ObjectJsonSelection
constructor
A new instance of ObjectJsonSelection.
Constructor Details
#initialize(json) ⇒ ObjectJsonSelection
Returns a new instance of ObjectJsonSelection.
23 24 25 26 27 28 29 30 31 |
# File 'lib/rafflesia/objects/object_json_selection.rb', line 23 def initialize(json) super() hash = self.class.normalize(json) @child_count = hash[:child_count] @path = hash[:path] @type = hash[:type] @value = hash[:value] @value_preview = hash[:value_preview] end |
Instance Attribute Details
#child_count ⇒ Object
Returns the value of attribute child_count.
16 17 18 |
# File 'lib/rafflesia/objects/object_json_selection.rb', line 16 def child_count @child_count end |
#path ⇒ Object
Returns the value of attribute path.
16 17 18 |
# File 'lib/rafflesia/objects/object_json_selection.rb', line 16 def path @path end |
#type ⇒ Object
Returns the value of attribute type.
16 17 18 |
# File 'lib/rafflesia/objects/object_json_selection.rb', line 16 def type @type end |
#value ⇒ Object
Returns the value of attribute value.
16 17 18 |
# File 'lib/rafflesia/objects/object_json_selection.rb', line 16 def value @value end |
#value_preview ⇒ Object
Returns the value of attribute value_preview.
16 17 18 |
# File 'lib/rafflesia/objects/object_json_selection.rb', line 16 def value_preview @value_preview end |