Class: DataMapper::Query::Conditions::NullOperation
- Inherits:
-
AbstractOperation
- Object
- AbstractOperation
- DataMapper::Query::Conditions::NullOperation
- Defined in:
- lib/dm-core/query/conditions/operation.rb
Instance Attribute Summary
Attributes inherited from AbstractOperation
Instance Method Summary collapse
-
#inspect ⇒ String
Inspecting the operation should return the same as nil.
-
#matches?(record) ⇒ boolean
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
694 695 696 |
# File 'lib/dm-core/query/conditions/operation.rb', line 694 def inspect 'nil' end |
#matches?(record) ⇒ boolean
Match the record
A NullOperation matches every record.
662 663 664 |
# File 'lib/dm-core/query/conditions/operation.rb', line 662 def matches?(record) record.is_a?(Hash) || record.is_a?(Resource) end |
#nil? ⇒ true
Treat the operation the same as nil
684 685 686 |
# File 'lib/dm-core/query/conditions/operation.rb', line 684 def nil? true end |
#valid? ⇒ true
Test validity of the operation
A NullOperation is always valid.
674 675 676 |
# File 'lib/dm-core/query/conditions/operation.rb', line 674 def valid? true end |