Class: Ezframe::Server

Inherits:
Object show all
Defined in:
lib/ezframe/server.rb

Class Method Summary collapse

Class Method Details

.call(env) ⇒ Object



5
6
7
8
9
10
11
12
13
# File 'lib/ezframe/server.rb', line 5

def self.call(env)
  req = Rack::Request.new(env)
  res = Rack::Response.new
  Controller.exec(req, res)
  if res.body.empty?
    raise "no body in response"
  end
  res.finish
end