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
: (Module raw_type, Module underlying_type) -> void.
-
#valid?(obj) ⇒ Boolean
: (untyped obj) -> bool.
Methods included from T::Types::Simple::NamePatch
Methods included from T::Types::Simple::GenericPatch
Constructor Details
#initialize(raw_type, underlying_type) ⇒ GenericType
: (Module raw_type, Module underlying_type) -> void
32 33 34 35 36 |
# File 'lib/tapioca/runtime/generic_type_registry.rb', line 32 def initialize(raw_type, ) super(raw_type) @underlying_type = #: Module end |
Instance Method Details
#valid?(obj) ⇒ Boolean
: (untyped obj) -> bool
40 41 42 |
# File 'lib/tapioca/runtime/generic_type_registry.rb', line 40 def valid?(obj) obj.is_a?(@underlying_type) end |