class HealthMonitor::Configuration

Constants

PROVIDERS

Attributes

basic_auth_credentials[RW]
environment_variables[RW]
error_callback[RW]
path[RW]
providers[R]

Public Class Methods

new() click to toggle source
# File lib/health_monitor/configuration.rb, line 13
def initialize
  database
end

Public Instance Methods

add_custom_provider(custom_provider_class) click to toggle source
# File lib/health_monitor/configuration.rb, line 28
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() click to toggle source
# File lib/health_monitor/configuration.rb, line 17
def no_database
  @providers.delete(HealthMonitor::Providers::Database)
end

Private Instance Methods

add_provider(provider_class) click to toggle source
# File lib/health_monitor/configuration.rb, line 38
def add_provider(provider_class)
  (@providers ||= Set.new) << provider_class

  provider_class
end