Class: Pakyow::Fail::Handler
- Inherits:
-
Object
- Object
- Pakyow::Fail::Handler
- Defined in:
- lib/pakyow-fail/handler.rb
Class Method Summary collapse
Class Method Details
.disable(name) ⇒ Object
14 15 16 |
# File 'lib/pakyow-fail/handler.rb', line 14 def self.disable(name) Config.fail.enabled_handlers.delete(name) end |
.enable(name) ⇒ Object
9 10 11 12 |
# File 'lib/pakyow-fail/handler.rb', line 9 def self.enable(name) return if Config.fail.enabled_handlers.include?(name) Config.fail.enabled_handlers << name end |
.register(name, klass, required_config) ⇒ Object
4 5 6 7 |
# File 'lib/pakyow-fail/handler.rb', line 4 def self.register(name, klass, required_config) Config.fail.available_handlers[name] = klass Config.fail.required_config[name] = required_config end |