Class: HealthMonitor::Configuration
- Inherits:
-
Object
- Object
- HealthMonitor::Configuration
- Defined in:
- lib/health_monitor/configuration.rb
Constant Summary collapse
- PROVIDERS =
%i[cache database delayed_job redis resque sidekiq].freeze
Instance Attribute Summary collapse
-
#basic_auth_credentials ⇒ Object
Returns the value of attribute basic_auth_credentials.
-
#environment_variables ⇒ Object
Returns the value of attribute environment_variables.
-
#error_callback ⇒ Object
Returns the value of attribute error_callback.
-
#providers ⇒ Object
readonly
Returns the value of attribute providers.
Instance Method Summary collapse
- #add_custom_provider(custom_provider_class) ⇒ Object
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #no_database ⇒ Object
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
10 11 12 |
# File 'lib/health_monitor/configuration.rb', line 10 def initialize database end |
Instance Attribute Details
#basic_auth_credentials ⇒ Object
Returns the value of attribute basic_auth_credentials.
7 8 9 |
# File 'lib/health_monitor/configuration.rb', line 7 def basic_auth_credentials @basic_auth_credentials end |
#environment_variables ⇒ Object
Returns the value of attribute environment_variables.
7 8 9 |
# File 'lib/health_monitor/configuration.rb', line 7 def environment_variables @environment_variables end |
#error_callback ⇒ Object
Returns the value of attribute error_callback.
7 8 9 |
# File 'lib/health_monitor/configuration.rb', line 7 def error_callback @error_callback end |
#providers ⇒ Object (readonly)
Returns the value of attribute providers.
8 9 10 |
# File 'lib/health_monitor/configuration.rb', line 8 def providers @providers end |
Instance Method Details
#add_custom_provider(custom_provider_class) ⇒ Object
25 26 27 28 29 30 31 32 |
# File 'lib/health_monitor/configuration.rb', line 25 def add_custom_provider(custom_provider_class) unless custom_provider_class < HealthMonitor::Providers::Base raise ArgumentError.new 'custom provider class must implement '\ 'HealthMonitor::Providers::Base' end add_provider(custom_provider_class) end |
#no_database ⇒ Object
14 15 16 |
# File 'lib/health_monitor/configuration.rb', line 14 def no_database @providers.delete(HealthMonitor::Providers::Database) end |