From 7ddf44650cd23c83ad83e975d69bc4542a59ee1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Sat, 10 Sep 2011 23:41:13 +0200 Subject: change Node::initialize --- lib/zorglub/node.rb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/zorglub/node.rb b/lib/zorglub/node.rb index 4b75286..45f7357 100644 --- a/lib/zorglub/node.rb +++ b/lib/zorglub/node.rb @@ -30,8 +30,7 @@ module Zorglub def call env meth, *args = env['PATH_INFO'][1..-1].split '/' meth||= 'index' - action = {:engine=>engine,:layout=>layout,:view=>r(meth),:method=>meth,:args=>args} - node = self.new Rack::Request.new(env), Rack::Response.new, action + node = self.new env, {:engine=>engine,:layout=>layout,:view=>r(meth),:method=>meth,:args=>args} return error_404 node if not node.respond_to? meth node.realize end @@ -46,12 +45,13 @@ module Zorglub # end # - attr_reader :request, :response, :action + attr_reader :action, :request, :response # - def initialize req, res, act - @action = act - @request = req - @response = res + def initialize env, action + @env = env + @action = action + @request = Rack::Request.new env + @response = Rack::Response.new end # def realize -- cgit v1.1-2-g2b99