Class: Cond::CondPrivate::HandlingSection

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) ⇒ HandlingSection

Returns a new instance of HandlingSection.



313
314
315
# File 'lib/cond.rb', line 313

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

Instance Method Details

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



317
318
319
# File 'lib/cond.rb', line 317

def handle(sym, message, &block)
  Cond.handlers_stack.last[sym] = Handler.new(message, &block)
end