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.



489
490
491
# File 'lib/tins/dslkit.rb', line 489

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