Module: Kinda::Core::This::ProcExtension

Included in:
Proc
Defined in:
lib/core/this.rb

Instance Method Summary collapse

Instance Method Details

#call_with_this(this, *args, &block) ⇒ Object



5
6
7
8
9
10
11
# File 'lib/core/this.rb', line 5

def call_with_this(this, *args, &block)
  binding_self = binding.eval('self')
  binding_self.push_this(this)
  call(*args, &block)
ensure
  binding_self.pop_this
end