Class: T::Types::TypedHash::Untyped
- Inherits:
-
T::Types::TypedHash
- Object
- Base
- T::Types::TypedEnumerable
- T::Types::TypedHash
- T::Types::TypedHash::Untyped
- Defined in:
- lib/types/types/typed_hash.rb
Defined Under Namespace
Modules: Private
Instance Method Summary collapse
- #freeze ⇒ Object
-
#initialize ⇒ Untyped
constructor
A new instance of Untyped.
- #valid?(obj) ⇒ Boolean
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
#initialize ⇒ Untyped
Returns a new instance of Untyped.
49 50 51 52 53 |
# File 'lib/types/types/typed_hash.rb', line 49 def initialize # Use the INSTANCE constant directly (rather than `T.untyped`) so this # can be built at load time, mirroring TypedArray::Untyped. super(keys: T::Types::Untyped::Private::INSTANCE, values: T::Types::Untyped::Private::INSTANCE) end |
Instance Method Details
#freeze ⇒ Object
59 60 61 62 |
# File 'lib/types/types/typed_hash.rb', line 59 def freeze build_type # force lazy initialization before freezing the object super end |