Class: GovukHealthcheck::Checkup

Inherits:
Object
  • Object
show all
Defined in:
lib/govuk_app_config/govuk_healthcheck/checkup.rb

Instance Method Summary collapse

Constructor Details

#initialize(checks) ⇒ Checkup

Returns a new instance of Checkup.

Parameters:

  • checks (Array)

    Array of objects/classes that respond to ‘run`



10
11
12
# File 'lib/govuk_app_config/govuk_healthcheck/checkup.rb', line 10

def initialize(checks)
  @checks = checks
end

Instance Method Details

#runObject



14
15
16
17
18
19
# File 'lib/govuk_app_config/govuk_healthcheck/checkup.rb', line 14

def run
  {
    status: worst_status,
    checks: component_statuses,
  }
end