Class: T::Types::TypedHash::Untyped
- Inherits:
-
TypedHash
- Object
- 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
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 |