aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/zero/controller.rb9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/zero/controller.rb b/lib/zero/controller.rb
index cd9dbeb..f7c8d53 100644
--- a/lib/zero/controller.rb
+++ b/lib/zero/controller.rb
@@ -20,16 +20,17 @@ module Zero
@@renderer
end
- # a small helper to get the actual renderer
- def renderer
- self.class.renderer
- end
+ # the renderer which can be used to render templates
+ attr_reader :renderer
# initialize the controller
+ #
+ # At initialization `@request`, `@response` and `@renderer` are set.
# @param request [Request] a request object
def initialize(request)
@request = request
@response = Zero::Response.new
+ @renderer = self.class.renderer
end
# build the response and return it