Sha256: 3bacebc365fec7a6deb0af2513d3e0349c1b41e606e729e3799d934c333358aa

Contents?: true

Size: 574 Bytes

Versions: 6

Compression:

Stored size: 574 Bytes

Contents

# frozen_string_literal: true

module Grape
  module Validations
    module Types
      # Instances of this class may be used as tokens to denote that a parameter value could not be
      # coerced. The given message will be used as a validation error.
      class InvalidValue
        attr_reader :message

        def initialize(message = nil)
          @message = message
        end
      end
    end
  end
end

# only exists to make it shorter for external use
module Grape
  module Types
    InvalidValue = Class.new(Grape::Validations::Types::InvalidValue)
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
grape-1.7.0 lib/grape/validations/types/invalid_value.rb
grape-1.6.2 lib/grape/validations/types/invalid_value.rb
grape-1.6.1 lib/grape/validations/types/invalid_value.rb
grape-1.6.0 lib/grape/validations/types/invalid_value.rb
grape-1.5.3 lib/grape/validations/types/invalid_value.rb
grape-1.5.2 lib/grape/validations/types/invalid_value.rb