Class: NetMate::Request

Inherits:
Object
  • Object
show all
Defined in:
lib/net_mate/request.rb

Instance Method Summary collapse

Constructor Details

#initializeRequest

Returns a new instance of Request.



14
15
16
# File 'lib/net_mate/request.rb', line 14

def initialize
  Routes.new.create_routes
end

Instance Method Details

#call(env) ⇒ Object



18
19
20
21
22
# File 'lib/net_mate/request.rb', line 18

def call env
  req = Rack::Request.new(env)
  dispatcher = Dispatcher.new(env['PATH_INFO'], env['REQUEST_METHOD'], req.params)
  dispatcher.dispatch
end