Module: T::Types::ProcBindPatch
- Defined in:
- lib/tapioca/sorbet_ext/proc_bind_patch.rb
Instance Method Summary collapse
- #initialize(arg_types, returns, bind = T::Private::Methods::ARG_NOT_PROVIDED) ⇒ Object
- #name ⇒ Object
Instance Method Details
#initialize(arg_types, returns, bind = T::Private::Methods::ARG_NOT_PROVIDED) ⇒ Object
7 8 9 10 11 12 13 |
# File 'lib/tapioca/sorbet_ext/proc_bind_patch.rb', line 7 def initialize(arg_types, returns, bind = T::Private::Methods::ARG_NOT_PROVIDED) super(arg_types, returns) unless bind == T::Private::Methods::ARG_NOT_PROVIDED @bind = T.let(T::Utils.coerce(bind), T::Types::Base) end end |
#name ⇒ Object
15 16 17 18 19 |
# File 'lib/tapioca/sorbet_ext/proc_bind_patch.rb', line 15 def name name = super name = name.sub("T.proc", "T.proc.bind(#{@bind})") unless @bind.nil? name end |