class Ezframe::Server
Public Class Methods
new()
click to toggle source
# File lib/ezframe/server.rb, line 5 def initialize Controller.init end
Public Instance Methods
call(env)
click to toggle source
# File lib/ezframe/server.rb, line 9 def call(env) req = Rack::Request.new(env) res = Rack::Response.new begin Controller.exec(req, res) rescue => e EzLog.error("Controller.exec: exception: #{e.message}:\n#{e.backtrace}") res.status = 500 res.headers["Content-Type"] = "text/plain" res.body = [ "Internal server error" ] end # if res.body.empty? # raise "no body in response" # end return res.finish end