lib/dentaku/calculator.rb in dentaku-0.2.14 vs lib/dentaku/calculator.rb in dentaku-1.0.0

- old
+ new

@@ -9,16 +9,16 @@ def initialize clear end - def add_rule(new_rule) - Rules.add_rule new_rule + def add_function(fn) + Rules.add_function(fn) self end - def add_rules(new_rules) - new_rules.each { | r | Rules.add_rule r } + def add_functions(fns) + fns.each { |fn| Rules.add_function(fn) } self end def evaluate(expression, data={}) @tokenizer ||= Tokenizer.new