module Healthchecker

Constants

APPLICATION_STARTED_AT
VERSION

Attributes

configuration[W]

Public Class Methods

add_check(name_or_class, options={}) click to toggle source
# File lib/healthchecker.rb, line 23
def self.add_check(name_or_class, options={})
  self.checks << lookup_class(name_or_class).new(options.merge(check: name_or_class))
end
configuration() click to toggle source
# File lib/healthchecker.rb, line 31
def self.configuration
  @configuration ||= Configuration.new
end
configure() { |configuration| ... } click to toggle source
# File lib/healthchecker.rb, line 39
def self.configure
  yield(configuration)
end
perform_checks() click to toggle source
# File lib/healthchecker.rb, line 27
def self.perform_checks
  self.checks.map(&:perform_check).compact
end
reset() click to toggle source
# File lib/healthchecker.rb, line 35
def self.reset
  @configuration = Configuration.new
end

Private Class Methods

lookup_class(name_or_class) click to toggle source
# File lib/healthchecker.rb, line 45
def self.lookup_class(name_or_class)
  return name_or_class if name_or_class.respond_to?(:new)
  "Healthchecker::Checks::#{name_or_class.to_s.capitalize}".constantize
end