Module: T::Types::Simple::NamePatch

Included in:
T::Types::Simple
Defined in:
lib/tapioca/sorbet_ext/name_patch.rb

Instance Method Summary collapse

Instance Method Details

#nameObject



8
9
10
11
12
13
14
15
# File 'lib/tapioca/sorbet_ext/name_patch.rb', line 8

def name
  # Sorbet memoizes this method into the `@name` instance variable but
  # doing so means that types get memoized before this patch is applied
  name = Tapioca::Runtime::Reflection.qualified_name_of(@raw_type)
  name = "::T.untyped" if name.nil?

  name
end