Class: EJSONExt::Decoders::Node
- Inherits:
-
Object
- Object
- EJSONExt::Decoders::Node
- Defined in:
- lib/ejson_ext/decoders/node.rb
Instance Attribute Summary collapse
-
#key ⇒ Object
readonly
Returns the value of attribute key.
-
#parent ⇒ Object
readonly
Returns the value of attribute parent.
Instance Method Summary collapse
- #compile(hash) ⇒ Object
-
#initialize(key, value, decoders, parent = NullNode.new) ⇒ Node
constructor
A new instance of Node.
- #value ⇒ Object
Constructor Details
Instance Attribute Details
#key ⇒ Object (readonly)
Returns the value of attribute key.
4 5 6 |
# File 'lib/ejson_ext/decoders/node.rb', line 4 def key @key end |
#parent ⇒ Object (readonly)
Returns the value of attribute parent.
4 5 6 |
# File 'lib/ejson_ext/decoders/node.rb', line 4 def parent @parent end |
Instance Method Details
#compile(hash) ⇒ Object
17 18 19 |
# File 'lib/ejson_ext/decoders/node.rb', line 17 def compile(hash) decoder.decoded_value(self, hash) end |
#value ⇒ Object
13 14 15 |
# File 'lib/ejson_ext/decoders/node.rb', line 13 def value @computed_value ||= computed_value end |