Class: Loom::Trap
- Inherits:
-
Object
- Object
- Loom::Trap
- Defined in:
- lib/loom/trap.rb
Defined Under Namespace
Modules: Sig Classes: Handler, SignalExit
Class Method Summary collapse
Class Method Details
.install(signal, trap_handler) ⇒ Object
22 23 24 25 26 27 |
# File 'lib/loom/trap.rb', line 22 def self.install(signal, trap_handler) raise "unknown signal => #{signal}" unless Signal.list[signal] Signal.trap signal do trap_handler.handle(signal) end end |