A new instance of Server.
Returns a new instance of Server.
2 3 4 5
# File 'lib/what/server.rb', line 2 def initialize What::Modules.load_all What::Monitor.go! end
7 8 9 10 11 12 13
# File 'lib/what/server.rb', line 7 def call(_) [ What::Status[:health] != :alert ? 200 : 503, {'Content-Type' => 'application/json'}, JSON.unparse(What::Status.all) + "\n" ] end