Class: ActiveScaffold::Bridges::LogicalQueryParser::TokensGrammar::Parser
- Defined in:
- lib/active_scaffold/bridges/logical_query_parser/tokens_grammar.rb
Instance Method Summary collapse
-
#initialize(operator = 'AND') ⇒ Parser
constructor
A new instance of Parser.
- #parse ⇒ Object
Constructor Details
#initialize(operator = 'AND') ⇒ Parser
Returns a new instance of Parser.
8 9 10 |
# File 'lib/active_scaffold/bridges/logical_query_parser/tokens_grammar.rb', line 8 def initialize(operator = 'AND') @operator = operator end |
Instance Method Details
#parse ⇒ Object
12 13 14 15 16 |
# File 'lib/active_scaffold/bridges/logical_query_parser/tokens_grammar.rb', line 12 def parse(*, **) super.tap do |node| node.instance_variable_set(:@literal_operator, @operator) end end |