Class: Philiprehberger::Template::Parser
- Inherits:
-
Object
- Object
- Philiprehberger::Template::Parser
- Defined in:
- lib/philiprehberger/template/parser.rb
Instance Method Summary collapse
-
#initialize(source) ⇒ Parser
constructor
A new instance of Parser.
- #parse ⇒ Object
Constructor Details
#initialize(source) ⇒ Parser
Returns a new instance of Parser.
6 7 8 9 10 |
# File 'lib/philiprehberger/template/parser.rb', line 6 def initialize(source) @source = source @open_delim = '{{' @close_delim = '}}' end |
Instance Method Details
#parse ⇒ Object
12 13 14 15 16 |
# File 'lib/philiprehberger/template/parser.rb', line 12 def parse tokens = tokenize apply_whitespace_control(tokens) build_tree(tokens, nil) end |