Class: ExceptionHunter::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/exception_hunter/config.rb

Overview

Config singleton class used to customize ExceptionHunter

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#admin_user_classString

Returns the name of the admin class (generally AdminUser).

Returns:

  • (String)

    the name of the admin class (generally AdminUser)



9
# File 'lib/exception_hunter/config.rb', line 9

cattr_accessor :admin_user_class

#current_user_methodSymbol

Returns the name of the current user method provided by Devise.

Returns:

  • (Symbol)

    the name of the current user method provided by Devise



12
# File 'lib/exception_hunter/config.rb', line 12

cattr_accessor :current_user_method

#enabledBoolean

Returns whether ExceptionHunter is active or not.

Returns:

  • (Boolean)

    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.

Returns:

  • (Boolean)

    Boolean



25
26
27
# File 'lib/exception_hunter/config.rb', line 25

def self.auth_enabled?
  admin_user_class.present? && admin_user_class.try(:underscore)
end

Instance Method Details

#errors_stale_timeNumeric

Returns number of days until an error is considered stale.

Returns:

  • (Numeric)

    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

#notifiersArray<Hash>

Returns configured notifiers for the application (see Notifiers).

Returns:

  • (Array<Hash>)

    configured notifiers for the application (see Notifiers)



18
# File 'lib/exception_hunter/config.rb', line 18

cattr_accessor :notifiers, default: []

#user_attributesArray<Symbol>

Returns attributes to whitelist on the user (see UserAttributesCollector).

Returns:



14
# File 'lib/exception_hunter/config.rb', line 14

cattr_accessor :user_attributes