Class: Cond::HandlingSection
- Inherits:
-
CodeSection
- Object
- CodeSection
- Cond::HandlingSection
- Defined in:
- lib/cond/handling_section.rb
Overview
:nodoc:
Instance Method Summary collapse
- #handle(sym, message, &block) ⇒ Object
-
#initialize(&block) ⇒ HandlingSection
constructor
A new instance of HandlingSection.
Methods inherited from CodeSection
Methods included from SymbolGenerator
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, , &block) Cond.handlers_stack.last[sym] = Handler.new(, &block) end |