Module: StepSequencer::Refinements::ObjectYieldSelf
- Defined in:
- lib/step_sequencer/refinements.rb
Overview
Object#yield_self
is in Ruby since a v2.5 patch although there it’s implemented on Kernel, which, being a module, makes it difficult to refine. Anyway, this is a backport; and it’s a incredibly simply function
Instance Method Summary collapse
Instance Method Details
#yield_self(&blk) ⇒ Object
42 43 44 |
# File 'lib/step_sequencer/refinements.rb', line 42 def yield_self(&blk) blk&.call self end |