Class: What::Server
- Inherits:
-
Object
- Object
- What::Server
- Defined in:
- lib/what/server.rb
Instance Method Summary collapse
- #call(_) ⇒ Object
-
#initialize ⇒ Server
constructor
A new instance of Server.
Constructor Details
#initialize ⇒ Server
3 4 5 6 7 |
# File 'lib/what/server.rb', line 3 def initialize Modules.load_all Formatters.load_all Monitor.go! end |
Instance Method Details
#call(_) ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/what/server.rb', line 9 def call(_) [ Status['health'] != 'alert' ? 200 : 503, {'Content-Type' => Formatter.mime}, Formatter.format(Status.all) ] end |