Module: T::Sig

Overview

Used as a mixin to any class so that you can call ‘sig`. Docs at sorbet.org/docs/sigs

Defined Under Namespace

Modules: WithoutRuntime

Instance Method Summary collapse

Methods included from Private::Methods::SingletonMethodHooks

#singleton_method_added

Methods included from Private::Methods::MethodHooks

#method_added

Instance Method Details

#sig(arg0 = nil, &blk) ⇒ Object



98
99
100
# File 'lib/types/sig.rb', line 98

def sig(arg0=nil, &blk)
  T::Private::Methods.declare_sig(T.unsafe(self), Kernel.caller_locations(1, 1)&.first, arg0, &blk)
end