ValidationMatcher
@private
# File lib/shoulda/matchers/active_model/numericality_matchers/comparison_matcher.rb, line 15 def initialize(numericality_matcher, value, operator) unless numericality_matcher.respond_to? :diff_to_compare raise ArgumentError, 'numericality_matcher is invalid' end @numericality_matcher = numericality_matcher @value = value @operator = operator @message = ERROR_MESSAGES[operator] @comparison_combos = comparison_combos @strict = false end
# File lib/shoulda/matchers/active_model/numericality_matchers/comparison_matcher.rb, line 41 def comparison_description "#{expectation} #{@value}" end
# File lib/shoulda/matchers/active_model/numericality_matchers/comparison_matcher.rb, line 27 def for(attribute) @attribute = attribute self end
Generated with the Darkfish Rdoc Generator 2.