Sha256: 77b88bda3cde466fc4c6404b70b71cd7e8ea6f4e12d982e566e06610e9fbc525

Contents?: true

Size: 232 Bytes

Versions: 7

Compression:

Stored size: 232 Bytes

Contents

module WeakParameters
  class ArrayValidator < WeakParameters::BaseValidator
    private

    def valid_type?
      value.is_a?(Array)
    end

    def error_message
      "params[#{key.inspect}] must be an Array"
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
weak_parameters-0.0.8 lib/weak_parameters/array_validator.rb
weak_parameters-0.0.7 lib/weak_parameters/array_validator.rb
weak_parameters-0.0.6 lib/weak_parameters/array_validator.rb
weak_parameters-0.0.5 lib/weak_parameters/array_validator.rb
weak_parameters-0.0.4 lib/weak_parameters/array_validator.rb
weak_parameters-0.0.3 lib/weak_parameters/array_validator.rb
weak_parameters-0.0.2 lib/weak_parameters/array_validator.rb