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
14
15
16
# File 'lib/ejson_ext/decoders/start_node.rb', line 8

def compile
  extensions = [
    Extensions::TimeExt.new,
    Extensions::Escape.new,
    Extensions::Default.new
  ]

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