Module: Tins::BlockSelf

Included in:
Object
Defined in:
lib/tins/dslkit.rb

Overview

This module includes the block_self module_function.

Class Method Summary collapse

Class Method Details

.block_self(&block) ⇒ Object

This method returns the receiver self of the context in which block was created.



468
469
470
# File 'lib/tins/dslkit.rb', line 468

def block_self(&block)
  eval 'self', block.__send__(:binding)
end