class HTTPResponse

Public Class Methods

new(env) click to toggle source
# File lib/http_response.rb, line 6
def initialize(env)
  @env = env
end

Public Instance Methods

generate() click to toggle source
# File lib/http_response.rb, line 10
def generate
         

         begin
           
           body = Router.new.route(@env)
           ["200", {}, body ]

         rescue Exception => ex
                   ["500", {}, [ex.message]]
         end    

       

end