Class: JSON5::LiteralNode

Inherits:
Node
  • Object
show all
Defined in:
lib/json5/document_nodes.rb

Instance Attribute Summary collapse

Attributes inherited from Node

#end_byte, #leading_trivia, #raw_span, #source, #start_byte, #trailing_trivia, #type

Instance Method Summary collapse

Methods inherited from Node

#raw

Constructor Details

#initialize(value:, **attributes) ⇒ LiteralNode

Returns a new instance of LiteralNode.



61
62
63
64
# File 'lib/json5/document_nodes.rb', line 61

def initialize(value:, **attributes)
  @value = value
  super(type: :literal, **attributes)
end

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



59
60
61
# File 'lib/json5/document_nodes.rb', line 59

def value
  @value
end