Class: T::Types::TypedHash::Untyped

Inherits:
T::Types::TypedHash show all
Defined in:
lib/types/types/typed_hash.rb

Instance Attribute Summary

Attributes inherited from T::Types::TypedHash

#keys, #values

Attributes inherited from T::Types::TypedEnumerable

#type

Instance Method Summary collapse

Methods inherited from T::Types::TypedHash

#name, #new, #underlying_class

Methods inherited from T::Types::TypedEnumerable

#describe_obj, #name, #underlying_class

Methods inherited from Base

#==, #describe_obj, #error_message_for_obj, #hash, method_added, #name, #subtype_of?, #to_s, #validate!

Constructor Details

#initializeUntyped

Returns a new instance of Untyped.



34
35
36
# File 'lib/types/types/typed_hash.rb', line 34

def initialize
  super(keys: T.untyped, values: T.untyped)
end

Instance Method Details

#valid?(obj) ⇒ Boolean

Returns:



38
39
40
# File 'lib/types/types/typed_hash.rb', line 38

def valid?(obj)
  obj.is_a?(Hash)
end