Class: Cond::CondPrivate::RestartableSection

Inherits:
CodeSection
  • Object
show all
Defined in:
lib/cond.rb

Overview

:nodoc:

Instance Method Summary collapse

Methods inherited from CodeSection

#again, #leave, #run

Methods included from SymbolGenerator

gensym, recycle, track

Constructor Details

#initialize(&block) ⇒ RestartableSection



303
304
305
# File 'lib/cond.rb', line 303

def initialize(&block)
  super(:with_restarts, &block)
end

Instance Method Details

#restart(sym, message, &block) ⇒ Object



307
308
309
# File 'lib/cond.rb', line 307

def restart(sym, message, &block)
  Cond.restarts_stack.last[sym] = Restart.new(message, &block)
end