class Conditions::LessThanCondition
Checks if value is less than a predicate
Public Class Methods
new(predicate)
click to toggle source
@param [Numeric] predicate
Calls superclass method
Conditions::BaseCondition::new
# File lib/conditions.rb, line 144 def initialize(predicate) raise ConditionError, 'LessThan condition predicate must a number' unless predicate.is_a?(Numeric) super(predicate) end
Public Instance Methods
apply(value)
click to toggle source
@param [Numeric] value @return [true] if +value < predicate+ @return [false] if +value >= predicate+
# File lib/conditions.rb, line 154 def apply(value) value < @predicate end