Class: Cond::HandlingSection

Inherits:
CodeSection show all
Defined in:
lib/cond/handling_section.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.



4
5
6
# File 'lib/cond/handling_section.rb', line 4

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

Instance Method Details

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



8
9
10
# File 'lib/cond/handling_section.rb', line 8

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