Class: JsonToToon::ObjectNode::KeyedValue

Inherits:
Object
  • Object
show all
Defined in:
lib/json_to_toon/object_node.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(key, value_node) ⇒ KeyedValue

Returns a new instance of KeyedValue.



10
11
12
13
# File 'lib/json_to_toon/object_node.rb', line 10

def initialize(key, value_node)
  @key = key.to_s
  @value_node = value_node
end

Instance Attribute Details

#keyObject (readonly)

Returns the value of attribute key.



8
9
10
# File 'lib/json_to_toon/object_node.rb', line 8

def key
  @key
end

#value_nodeObject (readonly)

Returns the value of attribute value_node.



8
9
10
# File 'lib/json_to_toon/object_node.rb', line 8

def value_node
  @value_node
end

Instance Method Details

#to_sObject



15
16
17
# File 'lib/json_to_toon/object_node.rb', line 15

def to_s
  @value_node.to_s
end