Class: EJSONExt::Decoders::StartNode

Inherits:
Object
  • Object
show all
Defined in:
lib/ejson_ext/decoders/start_node.rb

Instance Method Summary collapse

Constructor Details

#initialize(value) ⇒ StartNode

Returns a new instance of StartNode.



4
5
6
# File 'lib/ejson_ext/decoders/start_node.rb', line 4

def initialize(value)
  @value = value
end

Instance Method Details

#compileObject



8
9
10
11
12
13
# File 'lib/ejson_ext/decoders/start_node.rb', line 8

def compile
  Decoders::Node.new(nil, value).
    compile(Decoders::NullNode.new, {}).
    values.
    first
end