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.



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

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

Instance Method Details

#inspectObject



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

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