0
0
Fork 0

small minor cleanup

This removes #process and replaces it with some documentation for it.
Also the Rack::Response is replaced with Zero::Response.
This commit is contained in:
Gibheer 2012-11-26 21:24:59 +01:00
parent 4a51048d8b
commit fe7a622120
1 changed files with 4 additions and 5 deletions

View File

@ -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