Module: Jeanine::Rescuable::ClassMethods
- Defined in:
- lib/jeanine/rescuable.rb
Instance Method Summary collapse
Instance Method Details
#rescue_from(*exceptions, with: nil, &block) ⇒ Object
26 27 28 29 30 31 32 33 34 |
# File 'lib/jeanine/rescuable.rb', line 26 def rescue_from(*exceptions, with: nil, &block) exceptions.each do |exception| if with rescue_handlers[exception.to_s] = with else rescue_handlers[exception.to_s] = block end end end |
#rescue_handlers ⇒ Object
36 37 38 |
# File 'lib/jeanine/rescuable.rb', line 36 def rescue_handlers @rescue_handlers ||= {} end |