Class: Cel::Checker
- Inherits:
-
Object
- Object
- Cel::Checker
- Defined in:
- lib/cel/checker.rb
Instance Method Summary collapse
- #check(ast) ⇒ Object (also: #call)
-
#initialize(declarations) ⇒ Checker
constructor
A new instance of Checker.
Constructor Details
#initialize(declarations) ⇒ Checker
Returns a new instance of Checker.
5 6 7 |
# File 'lib/cel/checker.rb', line 5 def initialize(declarations) @declarations = declarations end |
Instance Method Details
#check(ast) ⇒ Object Also known as: call
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/cel/checker.rb', line 9 def check(ast) case ast when Group check(ast.value) when Invoke check_invoke(ast) when Operation check_operation(ast) when Literal ast.type when Identifier check_identifier(ast) when Condition check_condition(ast) end end |