Sha256: 0cc0266ebf58d867c4f78bbcceb4176aa1752123c06fea848d12c4d78279ade6

Contents?: true

Size: 229 Bytes

Versions: 7

Compression:

Stored size: 229 Bytes

Contents

module WeakParameters
  class HashValidator < WeakParameters::BaseValidator
    private

    def valid_type?
      value.is_a?(Hash)
    end

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

Version data entries

7 entries across 7 versions & 1 rubygems

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