Class: Eve::WebServer

Inherits:
Object
  • Object
show all
Defined in:
lib/eve/web_server.rb

Instance Method Summary collapse

Instance Method Details

#call(env) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/eve/web_server.rb', line 5

def call(env)
  
  response = ""
  Application.ids.each do |id|
    app = Application.new(:id => id)
    response += "<div>ID: #{app.id} (#{app.alive?})</div>"
  end
  
  [
    200, 
    {"Content-Type" => "text/html"}, 
    [response]
  ]
end