Class: FilterParam::Transpiler
- Inherits:
-
Object
- Object
- FilterParam::Transpiler
- Defined in:
- lib/filter_param/transpiler.rb
Instance Method Summary collapse
-
#initialize(ar_relation, definition) ⇒ Transpiler
constructor
A new instance of Transpiler.
- #transpile!(string_expression) ⇒ Object
Constructor Details
#initialize(ar_relation, definition) ⇒ Transpiler
Returns a new instance of Transpiler.
3 4 5 6 |
# File 'lib/filter_param/transpiler.rb', line 3 def initialize(ar_relation, definition) @ar_relation = ar_relation @definition = definition end |
Instance Method Details
#transpile!(string_expression) ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/filter_param/transpiler.rb', line 8 def transpile!(string_expression) return nil if string_expression.blank? ast_root = parse(string_expression) visit(ast_root) end |