Class: DataMapper::Query::Conditions::EqualToComparison
- Inherits:
-
AbstractComparison
- Object
- AbstractComparison
- DataMapper::Query::Conditions::EqualToComparison
- Includes:
- RelationshipHandler
- Defined in:
- lib/dm-core/query/conditions/comparison.rb
Overview
Tests whether the value in the record is equal to the expected set for the Comparison.
Instance Attribute Summary
Attributes inherited from AbstractComparison
#loaded_value, #parent, #subject
Instance Method Summary collapse
-
#matches?(record) ⇒ Boolean
Tests that the record value matches the comparison.
Methods included from RelationshipHandler
#foreign_key_mapping, #relationship?
Methods inherited from AbstractComparison
descendants, inherited, #inspect, #negated?, #property?, #relationship?, slug, #slug, #to_s, #valid?, #value
Methods included from Equalizer
Instance Method Details
#matches?(record) ⇒ Boolean
Tests that the record value matches the comparison
529 530 531 532 533 534 535 |
# File 'lib/dm-core/query/conditions/comparison.rb', line 529 def matches?(record) if expected.nil? record_value(record).nil? else super end end |