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.


199
200
201
202
# File 'lib/hamlit/parser/haml_parser.rb', line 199

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

Instance Method Details

#inspectObject


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

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