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
Instance Method Summary collapse
- #initialize(raw_type, underlying_type) ⇒ GenericType constructor
-
#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
32 33 34 35 36 |
# File 'lib/tapioca/runtime/generic_type_registry.rb', line 32 def initialize(raw_type, ) super(raw_type) @underlying_type = #: T::Module[top] 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 |