Class: DataMapper::Query::Conditions::GreaterThanOrEqualToComparison
- Inherits:
-
AbstractComparison
- Object
- AbstractComparison
- DataMapper::Query::Conditions::GreaterThanOrEqualToComparison
- Defined in:
- lib/dm-core/query/conditions/comparison.rb
Overview
Tests whether the value in the record is greater than, or equal to, the expected_value set for the Comparison.
Instance Attribute Summary
Attributes inherited from AbstractComparison
#loaded_value, #subject, #value
Instance Method Summary collapse
-
#matches?(record) ⇒ Boolean
Asserts that the record value matches the comparison.
Methods inherited from AbstractComparison
descendants, inherited, #inspect, #property?, #relationship?, #slug, slug, #to_s, #valid?
Methods included from Deprecate
Methods included from Equalizer
Instance Method Details
#matches?(record) ⇒ Boolean
Asserts that the record value matches the comparison
767 768 769 770 |
# File 'lib/dm-core/query/conditions/comparison.rb', line 767 def matches?(record) record_value = record_value(record) !record_value.nil? && record_value >= expected end |