Class: Rafflesia::ObjectJsonSelection

Inherits:
Types::BaseModel
  • Object
show all
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

Instance Method Summary collapse

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_countObject

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

#pathObject

Returns the value of attribute path.



16
17
18
# File 'lib/rafflesia/objects/object_json_selection.rb', line 16

def path
  @path
end

#typeObject

Returns the value of attribute type.



16
17
18
# File 'lib/rafflesia/objects/object_json_selection.rb', line 16

def type
  @type
end

#valueObject

Returns the value of attribute value.



16
17
18
# File 'lib/rafflesia/objects/object_json_selection.rb', line 16

def value
  @value
end

#value_previewObject

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