class DataMapper::Query::Conditions::LessThanOrEqualToComparison
Tests whether the value in the record is less than, or equal to, the expected set for the Comparison.
Public Instance Methods
matches?(record)
click to toggle source
Tests that the record value matches the comparison
@param [Resource, Hash] record
The record containing the value to be matched
@return [Boolean]
@api semipublic
# File lib/dm-core/query/conditions/comparison.rb, line 890 def matches?(record) return false if expected.nil? record_value = record_value(record) !record_value.nil? && record_value <= expected end
Private Instance Methods
comparator_string()
click to toggle source
@return [String]
@see DataMapper::Query::Conditions::AbstractComparison#to_s
@api private
# File lib/dm-core/query/conditions/comparison.rb, line 903 def comparator_string '<=' end