Class: OkComputerController

Inherits:
ActionController::Base
  • Object
show all
Defined in:
app/controllers/ok_computer_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject



14
15
16
17
18
19
# File 'app/controllers/ok_computer_controller.rb', line 14

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

  respond checks, status_code(checks)
end

#showObject



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

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

  respond check, status_code(check)
end