Skip to content

Commit

Permalink
No need to create instances all the time.
Browse files Browse the repository at this point in the history
  • Loading branch information
josevalim committed May 30, 2011
1 parent ba51926 commit ae08d02
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/frankie/app.ex
Expand Up @@ -9,13 +9,13 @@ module Frankie::App
% object.
object Wrapper
def initialize(app)
@('app, app)
@('routes: app.routes, 'app: app.new)
end

def handle_http(request, response)
verb = request.request_method
path = request.path
route = find_route(@app.routes, verb, path, request)
route = find_route(@routes, verb, path, request)
result = route.call(@app, request, response)

if result.__parent_name__ == 'String
Expand Down Expand Up @@ -70,7 +70,7 @@ module Frankie::App
[]
end

@method.bind(app.new).apply(args)
@method.bind(app).apply(args)
end
end

Expand Down

0 comments on commit ae08d02

Please sign in to comment.