Sha256: 54d3578d2f61bb50a6b2afe6fe88859c13a8cb417c7b14f5599ca288fa165cfc

Contents?: true

Size: 1.05 KB

Versions: 1

Compression:

Stored size: 1.05 KB

Contents

module Shoulda
  module Matchers
    module ActiveModel
      module NumericalityMatchers
        # @private
        class NumericTypeMatcher
          def initialize
            raise NotImplementedError
          end

          def matches?(subject)
            @disallow_value_matcher.matches?(subject)
          end

          def with_message(message)
            @disallow_value_matcher.with_message(message)
            self
          end

          def strict
            @disallow_value_matcher.strict
            self
          end

          def on(context)
            @disallow_value_matcher.on(context)
            self
          end

          def allowed_type
            raise NotImplementedError
          end

          def diff_to_compare
            raise NotImplementedError
          end

          def failure_message
            @disallow_value_matcher.failure_message
          end

          def failure_message_when_negated
            @disallow_value_matcher.failure_message_when_negated
          end
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
shoulda-matchers-3.0.0 lib/shoulda/matchers/active_model/numericality_matchers/numeric_type_matcher.rb