Class: Lamep
- Inherits:
-
Object
- Object
- Lamep
- Defined in:
- lib/lamep.rb
Instance Method Summary collapse
Instance Method Details
#evaluate(expression, attributes = {}) ⇒ Object
23 24 25 26 27 |
# File 'lib/lamep.rb', line 23 def evaluate(expression, attributes={}) tokens = TokenParser.new.parse(expression) postfix = ShuntingYard.new(tokens).postfix AbstractSyntaxTreeBuilder.new(postfix).build_tree.evaluate(attributes) end |