Class: Hamlit::HamlParser::ParseNode

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

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ ParseNode

Returns a new instance of ParseNode.



203
204
205
206
# File 'lib/hamlit/parser/haml_parser.rb', line 203

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

Instance Method Details

#inspectObject



208
209
210
# File 'lib/hamlit/parser/haml_parser.rb', line 208

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