diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2011-09-10 23:41:13 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2011-09-11 01:03:24 +0200 |
commit | 7ddf44650cd23c83ad83e975d69bc4542a59ee1e (patch) | |
tree | d783b06249124fae4410f9bafb79cb562085a9b7 | |
parent | 15d55e301ad7bbc643115d7146fcedb6554b9db4 (diff) | |
download | zorglub-7ddf44650cd23c83ad83e975d69bc4542a59ee1e.zip zorglub-7ddf44650cd23c83ad83e975d69bc4542a59ee1e.tar.gz |
change Node::initialize
-rw-r--r-- | lib/zorglub/node.rb | 14 |
1 files 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 |