Class: Haml::Parser::ParseNode

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

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ ParseNode

Returns a new instance of ParseNode.



224
225
226
227
# File 'lib/haml/parser.rb', line 224

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

Instance Method Details

#inspectObject



229
230
231
# File 'lib/haml/parser.rb', line 229

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