Class: Cond::RestartableSection
- Inherits:
-
CodeSection
- Object
- CodeSection
- Cond::RestartableSection
- Defined in:
- lib/cond/restartable_section.rb
Overview
:nodoc:
Instance Method Summary collapse
-
#initialize(&block) ⇒ RestartableSection
constructor
A new instance of RestartableSection.
- #restart(sym, message, &block) ⇒ Object
Methods inherited from CodeSection
Methods included from SymbolGenerator
Constructor Details
#initialize(&block) ⇒ RestartableSection
Returns a new instance of RestartableSection.
4 5 6 |
# File 'lib/cond/restartable_section.rb', line 4 def initialize(&block) super(:with_restarts, &block) end |
Instance Method Details
#restart(sym, message, &block) ⇒ Object
8 9 10 |
# File 'lib/cond/restartable_section.rb', line 8 def restart(sym, , &block) Cond.restarts_stack.last[sym] = Restart.new(, &block) end |