class Shoulda::Matchers::ActiveModel::NumericalityMatchers::OddNumberMatcher
@private
def allowed_type_adjective
def allowed_type_adjective 'odd' end
def diff_to_compare
def diff_to_compare 2 end
def disallowed_value
def disallowed_value if @numeric_type_matcher.given_numeric_column? NON_ODD_NUMBER_VALUE else NON_ODD_NUMBER_VALUE.to_s end end
def simple_description
def simple_description description = '' if expects_strict? description << 'strictly ' end description + "disallow :#{attribute} from being an even number" end
def wrap_disallow_value_matcher(matcher)
def wrap_disallow_value_matcher(matcher) matcher.with_message(:odd) end