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
-
.block_self(&block) ⇒ Object
This method returns the receiver self of the context in which block was created.
Instance Method Summary collapse
-
#block_self(&block) ⇒ Object
private
This method returns the receiver self of the context in which block was created.
Class Method Details
.block_self(&block) ⇒ Object
This method returns the receiver self of the context in which block was created.
783 784 785 |
# File 'lib/tins/dslkit.rb', line 783 def block_self(&block) eval 'self', block.__send__(:binding) end |
Instance Method Details
#block_self(&block) ⇒ Object (private)
This method returns the receiver self of the context in which block was created.
783 784 785 |
# File 'lib/tins/dslkit.rb', line 783 def block_self(&block) eval 'self', block.__send__(:binding) end |