Class: JsonToToon::ObjectNode::KeyedValue
- Inherits:
-
Object
- Object
- JsonToToon::ObjectNode::KeyedValue
- Defined in:
- lib/json_to_toon/object_node.rb
Instance Attribute Summary collapse
-
#key ⇒ Object
readonly
Returns the value of attribute key.
-
#value_node ⇒ Object
readonly
Returns the value of attribute value_node.
Instance Method Summary collapse
-
#initialize(key, value_node) ⇒ KeyedValue
constructor
A new instance of KeyedValue.
- #to_s ⇒ Object
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
#key ⇒ Object (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_node ⇒ Object (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_s ⇒ Object
15 16 17 |
# File 'lib/json_to_toon/object_node.rb', line 15 def to_s @value_node.to_s end |