Class: OpenStax::RescueFrom::Configuration
- Inherits:
-
Object
- Object
- OpenStax::RescueFrom::Configuration
- Defined in:
- lib/openstax/rescue_from/configuration.rb
Instance Attribute Summary collapse
-
#app_name ⇒ Object
Returns the value of attribute app_name.
- #contact_name ⇒ Object
-
#html_error_template_layout_name ⇒ Object
Returns the value of attribute html_error_template_layout_name.
-
#html_error_template_path ⇒ Object
Returns the value of attribute html_error_template_path.
-
#notify_background_exceptions ⇒ Object
Returns the value of attribute notify_background_exceptions.
-
#notify_background_proc ⇒ Object
Returns the value of attribute notify_background_proc.
-
#notify_exceptions ⇒ Object
Returns the value of attribute notify_exceptions.
-
#notify_proc ⇒ Object
Returns the value of attribute notify_proc.
-
#notify_rack_middleware ⇒ Object
Returns the value of attribute notify_rack_middleware.
-
#notify_rack_middleware_options ⇒ Object
Returns the value of attribute notify_rack_middleware_options.
-
#raise_background_exceptions ⇒ Object
Returns the value of attribute raise_background_exceptions.
-
#raise_exceptions ⇒ Object
Returns the value of attribute raise_exceptions.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/openstax/rescue_from/configuration.rb', line 16 def initialize @raise_exceptions = ![false, 'false'].include?(ENV['RAISE_EXCEPTIONS']) @raise_background_exceptions = ![false, 'false'].include?( ENV['RAISE_BACKGROUND_EXCEPTIONS'] ) @app_name = ENV['APP_NAME'] @contact_name = ENV['EXCEPTION_CONTACT_NAME'] @notify_exceptions = true @notify_proc = ->(proxy, controller) {} @notify_background_exceptions = true @notify_background_proc = ->(proxy) {} @html_error_template_path = 'errors/any' @html_error_template_layout_name = 'application' end |
Instance Attribute Details
#app_name ⇒ Object
Returns the value of attribute app_name.
5 6 7 |
# File 'lib/openstax/rescue_from/configuration.rb', line 5 def app_name @app_name end |
#contact_name ⇒ Object
12 13 14 |
# File 'lib/openstax/rescue_from/configuration.rb', line 12 def contact_name @contact_name || "us" end |
#html_error_template_layout_name ⇒ Object
Returns the value of attribute html_error_template_layout_name.
5 6 7 |
# File 'lib/openstax/rescue_from/configuration.rb', line 5 def html_error_template_layout_name @html_error_template_layout_name end |
#html_error_template_path ⇒ Object
Returns the value of attribute html_error_template_path.
5 6 7 |
# File 'lib/openstax/rescue_from/configuration.rb', line 5 def html_error_template_path @html_error_template_path end |
#notify_background_exceptions ⇒ Object
Returns the value of attribute notify_background_exceptions.
5 6 7 |
# File 'lib/openstax/rescue_from/configuration.rb', line 5 def notify_background_exceptions @notify_background_exceptions end |
#notify_background_proc ⇒ Object
Returns the value of attribute notify_background_proc.
5 6 7 |
# File 'lib/openstax/rescue_from/configuration.rb', line 5 def notify_background_proc @notify_background_proc end |
#notify_exceptions ⇒ Object
Returns the value of attribute notify_exceptions.
5 6 7 |
# File 'lib/openstax/rescue_from/configuration.rb', line 5 def notify_exceptions @notify_exceptions end |
#notify_proc ⇒ Object
Returns the value of attribute notify_proc.
5 6 7 |
# File 'lib/openstax/rescue_from/configuration.rb', line 5 def notify_proc @notify_proc end |
#notify_rack_middleware ⇒ Object
Returns the value of attribute notify_rack_middleware.
5 6 7 |
# File 'lib/openstax/rescue_from/configuration.rb', line 5 def notify_rack_middleware @notify_rack_middleware end |
#notify_rack_middleware_options ⇒ Object
Returns the value of attribute notify_rack_middleware_options.
5 6 7 |
# File 'lib/openstax/rescue_from/configuration.rb', line 5 def @notify_rack_middleware_options end |
#raise_background_exceptions ⇒ Object
Returns the value of attribute raise_background_exceptions.
5 6 7 |
# File 'lib/openstax/rescue_from/configuration.rb', line 5 def raise_background_exceptions @raise_background_exceptions end |
#raise_exceptions ⇒ Object
Returns the value of attribute raise_exceptions.
5 6 7 |
# File 'lib/openstax/rescue_from/configuration.rb', line 5 def raise_exceptions @raise_exceptions end |