Module: NQL::Syntax::Comparison1
- Defined in:
- lib/nql/grammar.rb
Instance Method Summary collapse
Instance Method Details
#is_node?(node_type) ⇒ Boolean
396 397 398 |
# File 'lib/nql/grammar.rb', line 396 def is_node?(node_type) node_type.to_sym == :comparison end |
#to_ransack ⇒ Object
390 391 392 393 394 |
# File 'lib/nql/grammar.rb', line 390 def to_ransack hash = {a: {'0' => {name: self.variable.text_value.gsub('.', '_')}}, p: self.comparator.to_ransack, v: {'0' => {value: self.value.text_value}}} hash = {c: [hash]} if !parent || !parent.parent || text_value == parent.parent.text_value hash end |