Module: T::Class

Defined in:
lib/types/_types.rb

Class Method Summary collapse

Class Method Details

.[](type) ⇒ Object



360
361
362
363
364
365
366
367
368
# File 'lib/types/_types.rb', line 360

def self.[](type)
  if type.is_a?(T::Types::Untyped)
    T::Types::TypedClass::Untyped::Private::INSTANCE
  elsif type.is_a?(T::Types::Anything)
    T::Types::TypedClass::Anything::Private::INSTANCE
  else
    T::Types::TypedClass::Private::Pool.type_for_module(type)
  end
end