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

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

Instance Method Summary collapse

Methods inherited from T::Types::TypedHash

#keys, #name, #new, #recursively_valid?, #type, #underlying_class, #values

Methods inherited from T::Types::TypedEnumerable

#build_type, #describe_obj, #name, #recursively_valid?, #type, #underlying_class

Methods inherited from Base

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

Constructor Details

#initializeUntyped

Returns a new instance of Untyped.



49
50
51
# File 'lib/types/types/typed_hash.rb', line 49

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

Instance Method Details

#valid?(obj) ⇒ Boolean

Returns:



53
54
55
# File 'lib/types/types/typed_hash.rb', line 53

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