Class: Racket::Utils::Views::Renderer
- Inherits:
-
Object
- Object
- Racket::Utils::Views::Renderer
- Defined in:
- lib/racket/utils/views/renderer.rb
Overview
Class responsible for rendering a controller/view/layout combination.
Class Method Summary collapse
-
.render(controller, view, layout) ⇒ Array
Renders a page using the provided controller/view and layout combination and returns an response array that can be sent to the client.
-
.service(_options = {}) ⇒ Proc
Returns a service proc that can be used by the registry.
Class Method Details
.render(controller, view, layout) ⇒ Array
Renders a page using the provided controller/view and layout combination and returns an response array that can be sent to the client.
39 40 41 42 43 44 |
# File 'lib/racket/utils/views/renderer.rb', line 39 def self.render(controller, view, layout) send_response( controller.response, view ? render_template(controller, view, layout) : controller.racket.action_result ) end |
.service(_options = {}) ⇒ Proc
Returns a service proc that can be used by the registry.
28 29 30 |
# File 'lib/racket/utils/views/renderer.rb', line 28 def self.service( = {}) -> { self } end |