Module: Vedeu::Runtime::Traps Private
- Defined in:
- lib/vedeu/runtime/traps.rb
Overview
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Vedeu can respond to various signals which are handled here.
Class Method Summary collapse
Class Method Details
.add_signal_trap(*keys, &block) ⇒ Array<Symbol>
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
19 20 21 22 23 24 25 26 27 |
# File 'lib/vedeu/runtime/traps.rb', line 19 def self.add_signal_trap(*keys, &block) raise Vedeu::Error::RequiresBlock unless block_given? # fail Signal.list.inspect keys.each do |key| Signal.trap(key.to_s, &block) if Signal.list.key?(key.to_s) end end |