Class: EZML::Parser::ParseNode

Inherits:
Struct
  • Object
show all
Defined in:
lib/ezml/parser.rb

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ ParseNode

Returns a new instance of ParseNode.



198
199
200
201
# File 'lib/ezml/parser.rb', line 198

def initialize(*args)
  super
  self.children ||= []
end

Instance Method Details

#inspectObject



203
204
205
# File 'lib/ezml/parser.rb', line 203

def inspect
  %Q[(#{type} #{value.inspect}#{children.each_with_object('') {|c, s| s << "\n#{c.inspect.gsub!(/^/, '  ')}"}})]
end