Object
# File lib/shoulda/matchers/active_model/validate_numericality_of_matcher.rb, line 86 def description "only allow #{allowed_types} values for #{@attribute}" end
# File lib/shoulda/matchers/active_model/validate_numericality_of_matcher.rb, line 70 def even even_number_matcher = OddEvenNumberMatcher.new(@attribute, :even => true) add_submatcher(even_number_matcher) self end
# File lib/shoulda/matchers/active_model/validate_numericality_of_matcher.rb, line 90 def failure_message_for_should submatcher_failure_messages_for_should.last end
# File lib/shoulda/matchers/active_model/validate_numericality_of_matcher.rb, line 94 def failure_message_for_should_not submatcher_failure_messages_for_should_not.last end
# File lib/shoulda/matchers/active_model/validate_numericality_of_matcher.rb, line 49 def is_equal_to(value) add_submatcher(ComparisonMatcher.new(value, :==).for(@attribute)) self end
# File lib/shoulda/matchers/active_model/validate_numericality_of_matcher.rb, line 39 def is_greater_than(value) add_submatcher(ComparisonMatcher.new(value, :>).for(@attribute)) self end
# File lib/shoulda/matchers/active_model/validate_numericality_of_matcher.rb, line 44 def is_greater_than_or_equal_to(value) add_submatcher(ComparisonMatcher.new(value, :>=).for(@attribute)) self end
# File lib/shoulda/matchers/active_model/validate_numericality_of_matcher.rb, line 54 def is_less_than(value) add_submatcher(ComparisonMatcher.new(value, :<).for(@attribute)) self end
# File lib/shoulda/matchers/active_model/validate_numericality_of_matcher.rb, line 59 def is_less_than_or_equal_to(value) add_submatcher(ComparisonMatcher.new(value, :<=).for(@attribute)) self end
# File lib/shoulda/matchers/active_model/validate_numericality_of_matcher.rb, line 81 def matches?(subject) @subject = subject submatchers_match? end
# File lib/shoulda/matchers/active_model/validate_numericality_of_matcher.rb, line 64 def odd odd_number_matcher = OddEvenNumberMatcher.new(@attribute, :odd => true) add_submatcher(odd_number_matcher) self end
Generated with the Darkfish Rdoc Generator 2.