Class: OkComputer::OkComputerController

Inherits:
ActionController::Base
  • Object
show all
Includes:
NewRelic::Agent::Instrumentation::ControllerInstrumentation, LegacyRailsControllerSupport
Defined in:
app/controllers/ok_computer/ok_computer_controller.rb

Instance Method Summary collapse

Methods included from LegacyRailsControllerSupport

included, #render

Instance Method Details

#indexObject



21
22
23
24
25
26
# File 'app/controllers/ok_computer/ok_computer_controller.rb', line 21

def index
  checks = OkComputer::Registry.all
  checks.run

  respond checks, status_code(checks)
end

#showObject



28
29
30
31
32
33
# File 'app/controllers/ok_computer/ok_computer_controller.rb', line 28

def show
  check = OkComputer::Registry.fetch(params[:check])
  check.run

  respond check, status_code(check)
end