Class: ActiveRecord::Inequality::NotEqual

Inherits:
Base
  • Object
show all
Defined in:
lib/inequal_opportunity.rb

Instance Attribute Summary

Attributes inherited from Base

#value

Instance Method Summary collapse

Methods inherited from Base

#==, #initialize, #inspect, #string_value

Constructor Details

This class inherits a constructor from ActiveRecord::Inequality::Base

Instance Method Details

#operatorObject



57
58
59
60
61
62
63
64
65
66
# File 'lib/inequal_opportunity.rb', line 57

def operator
  case value
  when NilClass, TrueClass, FalseClass
   'IS NOT'
  when Array
   'NOT IN'
  else
    '<>'
  end
end