Class: Tpt::Rails::Internal::HealthChecks
- Inherits:
-
Object
- Object
- Tpt::Rails::Internal::HealthChecks
- Defined in:
- lib/tpt/rails/internal/health_checks.rb
Overview
:nodoc:
Instance Method Summary collapse
- #add(name, &block) ⇒ Object
- #check ⇒ Object
-
#initialize ⇒ HealthChecks
constructor
A new instance of HealthChecks.
- #setup ⇒ Object
Constructor Details
#initialize ⇒ HealthChecks
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 |
#check ⇒ Object
10 11 12 |
# File 'lib/tpt/rails/internal/health_checks.rb', line 10 def check @checks.transform_values(&:call) end |
#setup ⇒ Object
14 15 16 17 |
# File 'lib/tpt/rails/internal/health_checks.rb', line 14 def setup setup_active_record setup_redis end |