Module: NQL::Syntax::Comparator0

Defined in:
lib/nql/grammar.rb

Instance Method Summary collapse

Instance Method Details

#to_ransackObject



388
389
390
391
392
393
394
395
396
397
398
399
400
# File 'lib/nql/grammar.rb', line 388

def to_ransack
  comparators = {
    '=' => 'eq',
    '!=' => 'not_eq',
    '>' => 'gt',
    '>=' => 'gteq',
    '<' => 'lt',
    '<=' => 'lteq',
    ':' => 'cont',
    '~' => 'matches'
  }
  comparators[text_value]
end