summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2011-06-16 15:47:50 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2011-06-16 15:47:50 +0200
commit9afeb6e5a87e50eef1c87844e1c2923cc2680f73 (patch)
treece0db3bf114d53d93a3904b23a636080aa2c98c0 /lib
parent70bc18d63c63c644dc7239c66f6606ddc4a9b8bc (diff)
downloadzorglub-9afeb6e5a87e50eef1c87844e1c2923cc2680f73.zip
zorglub-9afeb6e5a87e50eef1c87844e1c2923cc2680f73.tar.gz
add Node#realize
Diffstat (limited to 'lib')
-rw-r--r--lib/zorglub/node.rb14
1 files changed, 12 insertions, 2 deletions
diff --git a/lib/zorglub/node.rb b/lib/zorglub/node.rb
index 89b0cf2..99d6c5d 100644
--- a/lib/zorglub/node.rb
+++ b/lib/zorglub/node.rb
@@ -31,8 +31,9 @@ module Zorglub
meth||= 'index'
node = self.new Rack::Request.new(env), Rack::Response.new, {:engine=>engine,:layout=>layout,:view=>File.join(r,meth),:method=>meth,:args=>args}
return error_404 node if not node.respond_to? meth
- # TODO session
- node.send meth, *args
+ # TODO
+ # - session
+ node.realize
end
#
def error_404 node
@@ -53,6 +54,15 @@ module Zorglub
@response = res
end
#
+ def realize
+ # TODO
+ # - use view
+ # - use layout
+ r = self.send @action[:method], *@action[:args]
+ response.write r
+ response.finish
+ end
+ #
def engine engine=nil
@action[:engine] = engine unless engine.nil?
@action[:engine]