Class: JSON5::ObjectNode

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(members:, **attributes) ⇒ ObjectNode

Returns a new instance of ObjectNode.



84
85
86
87
# File 'lib/json5/document_nodes.rb', line 84

def initialize(members:, **attributes)
  @members = members.dup.freeze
  super(type: :object, **attributes)
end

Instance Attribute Details

#membersObject (readonly)

Returns the value of attribute members.



82
83
84
# File 'lib/json5/document_nodes.rb', line 82

def members
  @members
end