Module: DSLKit::BlockSelf

Included in:
Object
Defined in:
lib/dslkit/polite.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.



564
565
566
# File 'lib/dslkit/polite.rb', line 564

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