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, #bound_class, #count, #first, #inspect, #list, #to_criteria, #to_hash, #to_s, #|
Constructor Details
#initialize(c) ⇒ NotCriterion
Returns a new instance of NotCriterion.
598 599 600 |
# File 'lib/criteria.rb', line 598 def initialize(c) @criterion = c end |
Instance Attribute Details
#criterion ⇒ Object
Returns the value of attribute criterion.
597 598 599 |
# File 'lib/criteria.rb', line 597 def criterion @criterion end |
Instance Method Details
#columns ⇒ Object
606 607 608 |
# File 'lib/criteria.rb', line 606 def columns @criterion.colums end |
#not ⇒ Object
602 603 604 |
# File 'lib/criteria.rb', line 602 def not @criterion end |
#to_where_sql ⇒ Object
610 611 612 |
# File 'lib/criteria.rb', line 610 def to_where_sql "NOT (#{@criterion.to_where_sql})" end |