Object
@private
# File lib/shoulda/matchers/active_model/validate_numericality_of_matcher.rb, line 303 def allow_nil prepare_submatcher( AllowValueMatcher.new(nil) .for(@attribute) .with_message(:not_a_number) ) self end
# File lib/shoulda/matchers/active_model/validate_numericality_of_matcher.rb, line 361 def description "only allow #{allowed_types} for #{@attribute}#{comparison_descriptions}" end
# File lib/shoulda/matchers/active_model/validate_numericality_of_matcher.rb, line 319 def even prepare_submatcher( NumericalityMatchers::EvenNumberMatcher.new(@attribute) ) self end
# File lib/shoulda/matchers/active_model/validate_numericality_of_matcher.rb, line 365 def failure_message submatcher_failure_messages_for_should.last end
# File lib/shoulda/matchers/active_model/validate_numericality_of_matcher.rb, line 370 def failure_message_when_negated submatcher_failure_messages_for_should_not.last end
# File lib/shoulda/matchers/active_model/validate_numericality_of_matcher.rb, line 336 def is_equal_to(value) prepare_submatcher(comparison_matcher_for(value, :==).for(@attribute)) self end
# File lib/shoulda/matchers/active_model/validate_numericality_of_matcher.rb, line 326 def is_greater_than(value) prepare_submatcher(comparison_matcher_for(value, :>).for(@attribute)) self end
# File lib/shoulda/matchers/active_model/validate_numericality_of_matcher.rb, line 331 def is_greater_than_or_equal_to(value) prepare_submatcher(comparison_matcher_for(value, :>=).for(@attribute)) self end
# File lib/shoulda/matchers/active_model/validate_numericality_of_matcher.rb, line 341 def is_less_than(value) prepare_submatcher(comparison_matcher_for(value, :<).for(@attribute)) self end
# File lib/shoulda/matchers/active_model/validate_numericality_of_matcher.rb, line 346 def is_less_than_or_equal_to(value) prepare_submatcher(comparison_matcher_for(value, :<=).for(@attribute)) self end
# File lib/shoulda/matchers/active_model/validate_numericality_of_matcher.rb, line 356 def matches?(subject) @subject = subject submatchers_match? end
# File lib/shoulda/matchers/active_model/validate_numericality_of_matcher.rb, line 312 def odd prepare_submatcher( NumericalityMatchers::OddNumberMatcher.new(@attribute) ) self end
Generated with the Darkfish Rdoc Generator 2.