Module: Dentaku

Defined in:
lib/dentaku.rb,
lib/dentaku/token.rb,
lib/dentaku/parser.rb,
lib/dentaku/ast/nil.rb,
lib/dentaku/version.rb,
lib/dentaku/ast/node.rb,
lib/dentaku/tokenizer.rb,
lib/dentaku/ast/string.rb,
lib/dentaku/calculator.rb,
lib/dentaku/exceptions.rb,
lib/dentaku/ast/literal.rb,
lib/dentaku/ast/logical.rb,
lib/dentaku/ast/numeric.rb,
lib/dentaku/ast/function.rb,
lib/dentaku/ast/grouping.rb,
lib/dentaku/ast/negation.rb,
lib/dentaku/ast/operation.rb,
lib/dentaku/token_matcher.rb,
lib/dentaku/token_scanner.rb,
lib/dentaku/ast/arithmetic.rb,
lib/dentaku/ast/identifier.rb,
lib/dentaku/token_matchers.rb,
lib/dentaku/ast/combinators.rb,
lib/dentaku/ast/comparators.rb,
lib/dentaku/ast/functions/if.rb,
lib/dentaku/dependency_resolver.rb,
lib/dentaku/bulk_expression_solver.rb

Defined Under Namespace

Modules: AST, TokenMatchers Classes: BulkExpressionSolver, Calculator, DependencyResolver, Parser, Token, TokenMatcher, TokenScanner, Tokenizer, UnboundVariableError

Constant Summary collapse

VERSION =
"2.0.1"

Class Method Summary collapse

Class Method Details

.cache_ast?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/dentaku.rb', line 14

def self.cache_ast?
  @enable_ast_caching
end

.enable_ast_cache!Object



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

def self.enable_ast_cache!
  @enable_ast_caching = true
end

.evaluate(expression, data = {}) ⇒ Object



6
7
8
# File 'lib/dentaku.rb', line 6

def self.evaluate(expression, data={})
  calculator.evaluate(expression, data)
end