Class: Criteria::NotCriterion
Constant Summary
Constants inherited from Criterion
Criterion::EQUAL, Criterion::GREATER_THAN, Criterion::GREATER_THAN_OR_EQUAL, Criterion::IN, Criterion::LESS_THAN, Criterion::LESS_THAN_OR_EQUAL, Criterion::NOT_EQUAL, Criterion::NOT_IN
Instance Attribute Summary collapse
-
#criterion ⇒ Object
Returns the value of attribute criterion.
Attributes inherited from Criterion
Instance Method Summary collapse
- #columns ⇒ Object
-
#initialize(c) ⇒ NotCriterion
constructor
A new instance of NotCriterion.
- #not ⇒ Object
- #to_where_sql ⇒ Object
Methods inherited from Criterion
#&, #associations, #to_hash, #to_s, #|
Constructor Details
#initialize(c) ⇒ NotCriterion
Returns a new instance of NotCriterion.
490 491 492 |
# File 'lib/criteria.rb', line 490 def initialize(c) @criterion = c end |
Instance Attribute Details
#criterion ⇒ Object
Returns the value of attribute criterion.
489 490 491 |
# File 'lib/criteria.rb', line 489 def criterion @criterion end |
Instance Method Details
#columns ⇒ Object
498 499 500 |
# File 'lib/criteria.rb', line 498 def columns @criterion.colums end |
#not ⇒ Object
494 495 496 |
# File 'lib/criteria.rb', line 494 def not @criterion end |
#to_where_sql ⇒ Object
502 503 504 |
# File 'lib/criteria.rb', line 502 def to_where_sql "NOT (#{@criterion.to_where_sql})" end |