Class: ExceptionHunter::Config
- Inherits:
-
Object
- Object
- ExceptionHunter::Config
- Defined in:
- lib/exception_hunter/config.rb
Overview
Config singleton class used to customize ExceptionHunter
Instance Attribute Summary collapse
-
#admin_user_class ⇒ String
The name of the admin class (generally AdminUser).
-
#async_logging ⇒ Boolean
Whether ExceptionHunter should log async or not.
-
#current_user_method ⇒ Symbol
The name of the current user method provided by Devise.
-
#enabled ⇒ Boolean
Whether ExceptionHunter is active or not.
Class Method Summary collapse
-
.auth_enabled? ⇒ Boolean
Returns true if there's an admin user class configured to authenticate against.
Instance Method Summary collapse
-
#errors_stale_time ⇒ Numeric
Number of days until an error is considered stale.
-
#notifiers ⇒ Array<Hash>
Configured notifiers for the application (see Notifiers).
-
#user_attributes ⇒ Array<Symbol>
Attributes to whitelist on the user (see UserAttributesCollector).
Instance Attribute Details
#admin_user_class ⇒ String
Returns the name of the admin class (generally AdminUser).
9 |
# File 'lib/exception_hunter/config.rb', line 9 cattr_accessor :admin_user_class |
#async_logging ⇒ Boolean
Returns whether ExceptionHunter should log async or not.
22 |
# File 'lib/exception_hunter/config.rb', line 22 cattr_accessor :async_logging, default: false |
#current_user_method ⇒ Symbol
Returns the name of the current user method provided by Devise.
12 |
# File 'lib/exception_hunter/config.rb', line 12 cattr_accessor :current_user_method |
#enabled ⇒ Boolean
Returns whether ExceptionHunter is active or not.
6 |
# File 'lib/exception_hunter/config.rb', line 6 cattr_accessor :enabled, default: true |
Class Method Details
.auth_enabled? ⇒ Boolean
Returns true if there's an admin user class configured to authenticate against.
28 29 30 |
# File 'lib/exception_hunter/config.rb', line 28 def self.auth_enabled? admin_user_class.present? && admin_user_class.try(:underscore) end |
Instance Method Details
#errors_stale_time ⇒ Numeric
Returns number of days until an error is considered stale.
16 |
# File 'lib/exception_hunter/config.rb', line 16 cattr_accessor :errors_stale_time, default: 45.days |
#notifiers ⇒ Array<Hash>
Returns configured notifiers for the application (see Notifiers).
18 |
# File 'lib/exception_hunter/config.rb', line 18 cattr_accessor :notifiers, default: [] |
#user_attributes ⇒ Array<Symbol>
Returns attributes to whitelist on the user (see UserAttributesCollector).
14 |
# File 'lib/exception_hunter/config.rb', line 14 cattr_accessor :user_attributes |