From 926775f029dfcbedcda087242151dae7ee31b51f Mon Sep 17 00:00:00 2001 From: Gibheer Date: Sat, 17 Nov 2012 14:23:41 +0100 Subject: seperated the methods of the basic controller --- lib/zero/controller.rb | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3-70-g09d2