Class: Tapioca::Runtime::GenericTypeRegistry::GenericType
- Inherits:
-
T::Types::Simple
- Object
- T::Types::Simple
- Tapioca::Runtime::GenericTypeRegistry::GenericType
- Extended by:
- T::Sig
- Defined in:
- lib/tapioca/runtime/generic_type_registry.rb
Constant Summary
Constants included from T::Types::Simple::NamePatch
T::Types::Simple::NamePatch::NAME_METHOD
Instance Method Summary collapse
-
#initialize(raw_type, underlying_type) ⇒ GenericType
constructor
A new instance of GenericType.
- #valid?(obj) ⇒ Boolean
Methods included from T::Types::Simple::NamePatch
Methods included from T::Types::Simple::GenericPatch
Constructor Details
#initialize(raw_type, underlying_type) ⇒ GenericType
Returns a new instance of GenericType.
38 39 40 41 42 |
# File 'lib/tapioca/runtime/generic_type_registry.rb', line 38 def initialize(raw_type, ) super(raw_type) @underlying_type = T.let(, Module) end |
Instance Method Details
#valid?(obj) ⇒ Boolean
45 46 47 |
# File 'lib/tapioca/runtime/generic_type_registry.rb', line 45 def valid?(obj) obj.is_a?(@underlying_type) end |