aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGibheer <gibheer@gmail.com>2012-11-17 14:23:41 +0100
committerGibheer <gibheer@gmail.com>2012-11-20 20:37:10 +0100
commit926775f029dfcbedcda087242151dae7ee31b51f (patch)
tree31bbf9c9b0914e92388ae2dc5f1bd9cc562c8933 /lib
parent8e1b79663c1ac1a105e0e1103b4d09c0d897371d (diff)
seperated the methods of the basic controller
Diffstat (limited to 'lib')
-rw-r--r--lib/zero/controller.rb12
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/zero/controller.rb b/lib/zero/controller.rb
index 76d0f46..5784aa0 100644
--- a/lib/zero/controller.rb
+++ b/lib/zero/controller.rb
@@ -20,7 +20,17 @@ module Zero
# build the response and return it
# @return Response a rack conform response
def response
- raise NotImplementedError.new("Not Implemented in ${__FILE__}")
+ process if respond_to?(:process)
+ render
+ @response
+ end
+
+ def process
+ raise NotImplementedError.new("'render' not implemented in #{self.class}")
+ end
+
+ def process
+ raise NotImplementedError.new("'render' not implemented in #{self.class}")
end
end
end