Class: DataMapper::Query::Conditions::NullOperation
- Inherits:
-
AbstractOperation
- Object
- AbstractOperation
- DataMapper::Query::Conditions::NullOperation
- Defined in:
- lib/dm-core/query/conditions/operation.rb
Overview
class NotOperation
Instance Attribute Summary
Attributes inherited from AbstractOperation
Instance Method Summary collapse
-
#inspect ⇒ String
Inspecting the operation should return the same as nil.
-
#matches?(record) ⇒ true
Match the record.
-
#nil? ⇒ true
Treat the operation the same as nil.
-
#valid? ⇒ true
Test validity of the operation.
Methods inherited from AbstractOperation
#<<, #clear, descendants, #difference, #each, #empty?, #first, inherited, #intersection, #merge, #minimize, #negated?, #one?, #slug, slug, #sorted_operands, #to_s, #union
Methods included from Equalizer
Methods included from Assertions
Instance Method Details
#inspect ⇒ String
Inspecting the operation should return the same as nil
702 703 704 |
# File 'lib/dm-core/query/conditions/operation.rb', line 702 def inspect 'nil' end |
#matches?(record) ⇒ true
Match the record
A NullOperation matches every record.
670 671 672 |
# File 'lib/dm-core/query/conditions/operation.rb', line 670 def matches?(record) record.kind_of?(Hash) || record.kind_of?(Resource) end |
#nil? ⇒ true
Treat the operation the same as nil
692 693 694 |
# File 'lib/dm-core/query/conditions/operation.rb', line 692 def nil? true end |
#valid? ⇒ true
Test validity of the operation
A NullOperation is always valid.
682 683 684 |
# File 'lib/dm-core/query/conditions/operation.rb', line 682 def valid? true end |