From fe7a6221201ffeb7a8028a785d86f60c063fc2f9 Mon Sep 17 00:00:00 2001 From: Gibheer Date: Mon, 26 Nov 2012 21:24:59 +0100 Subject: small minor cleanup This removes #process and replaces it with some documentation for it. Also the Rack::Response is replaced with Zero::Response. --- lib/zero/controller.rb | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/zero/controller.rb b/lib/zero/controller.rb index 9857974..2b4f148 100644 --- a/lib/zero/controller.rb +++ b/lib/zero/controller.rb @@ -14,19 +14,18 @@ module Zero # @param request [Request] a request object def initialize(request) @request = request - @response = Rack::Response.new + @response = Zero::Response.new end # build the response and return it + # + # This method calls #process if it was defined so make it easier to process + # the request before rendering stuff. # @return Response a rack conform response def response process if respond_to?(:process) render @response end - - def process - raise NotImplementedError.new("'render' not implemented in #{self.class}") - end end end -- cgit v1.2.3-70-g09d2