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:
parent
4a51048d8b
commit
fe7a622120
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue