Module: Pakyow::Application::Behavior::Rescuing

Extended by:
Support::Extension
Included in:
Pakyow::Application, Plugin
Defined in:
lib/pakyow/application/behavior/rescuing.rb

Overview

Lets an app to be rescued from errors encountered during boot. Once rescued, an app returns a 500 response with the error that caused it to fail.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#rescuedObject (readonly)

Error the app was rescued from.



16
17
18
# File 'lib/pakyow/application/behavior/rescuing.rb', line 16

def rescued
  @rescued
end

Instance Method Details

#rescued?Boolean

Returns true if the app has been rescued.

Returns:

  • (Boolean)


20
21
22
# File 'lib/pakyow/application/behavior/rescuing.rb', line 20

def rescued?
  instance_variable_defined?(:@rescued) && !!@rescued
end