Class: Haml::Temple::Parser

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

Instance Method Summary (collapse)

Constructor Details

- (Parser) initialize(*args)

Returns a new instance of Parser



42
43
44
# File 'lib/haml/temple.rb', line 42

def initialize(*args)
  @options = Options.new
end

Instance Method Details

- call(haml)



46
47
48
49
50
# File 'lib/haml/temple.rb', line 46

def call(haml)
  parser = ::Haml::Parser.new(haml, @options)
  tree = parser.parse.tap {|x| p x; puts '-' * 10}
  compile(tree).tap {|x| p x; puts '-' * 10}
end