Class: Tpt::Rails::Internal::HealthChecks

Inherits:
Object
  • Object
show all
Defined in:
lib/tpt/rails/internal/health_checks.rb

Overview

:nodoc:

Instance Method Summary collapse

Constructor Details

#initializeHealthChecks

Returns a new instance of HealthChecks.



2
3
4
# File 'lib/tpt/rails/internal/health_checks.rb', line 2

def initialize
  @checks = {}
end

Instance Method Details

#add(name, &block) ⇒ Object



6
7
8
# File 'lib/tpt/rails/internal/health_checks.rb', line 6

def add(name, &block)
  @checks[name] = block
end

#checkObject



10
11
12
# File 'lib/tpt/rails/internal/health_checks.rb', line 10

def check
  @checks.transform_values(&:call)
end

#setupObject



14
15
16
17
# File 'lib/tpt/rails/internal/health_checks.rb', line 14

def setup
  setup_active_record
  setup_redis
end