Class: Huml::Parser

Inherits:
Treetop::Runtime::CompiledParser
  • Object
show all
Includes:
Huml
Defined in:
lib/huml.rb

Constant Summary

Constants included from Huml

VERSION

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Parser

Returns a new instance of Parser.



10
11
12
# File 'lib/huml.rb', line 10

def initialize(options = {})
  super()
end

Instance Method Details

#call(string) ⇒ Object



14
15
16
17
18
19
20
# File 'lib/huml.rb', line 14

def call(string)
  if result = parse(string)
    result.tokenize
  else
    raise Exception, self.failure_reason
  end
end