0
0
Fork 0

a small fix to make the controller useable

This is just to use the controller for a demonstration on where this all
is heading to.
This commit is contained in:
Gibheer 2012-11-26 21:38:49 +01:00
parent 06e0dc22e1
commit 77a2cbe6d4
1 changed files with 15 additions and 0 deletions

View File

@ -10,6 +10,21 @@ module Zero
new(Zero::Request.new(env)).response
end
# set the renderer to use in the controller
def self.renderer=(renderer)
@@renderer = renderer
end
# get the renderer set in the controller
def self.renderer
@@renderer
end
# a small helper to get the actual renderer
def renderer
self.class.renderer
end
# initialize the controller
# @param request [Request] a request object
def initialize(request)