Method: Parameters::Types::Hash#===

Defined in:
lib/parameters/types/hash.rb

#===(value) ⇒ Boolean

Determines if the Hash, and all keys/values, are related to the Type.



109
110
111
112
113
114
# File 'lib/parameters/types/hash.rb', line 109

def ===(value)
  (self.class === value) && value.entries.all? do |k,v|
    (@key_type.nil? || @key_type === k) &&
    (@value_type.nil? || @value_type === v)
  end
end