Module: Assert::View::Renderer
- Included in:
- Base
- Defined in:
- lib/assert/view/base.rb
Overview
this module is mixed in to the Assert::View::Base class it use Undies to define and render view templates
Defined Under Namespace
Modules: ClassMethods Classes: Template
Class Method Summary collapse
Instance Method Summary collapse
-
#render(*args, &runner_callback) ⇒ Object
this method is required by assert and is called by the test runner use Undies to render the template using the view’s template file streaming to the view’s output io passing in the view itself and any runner_callback as locals.
Class Method Details
.included(receiver) ⇒ Object
11 12 13 |
# File 'lib/assert/view/base.rb', line 11 def self.included(receiver) receiver.send(:extend, ClassMethods) end |
Instance Method Details
#render(*args, &runner_callback) ⇒ Object
this method is required by assert and is called by the test runner use Undies to render the template using the view’s template file streaming to the view’s output io passing in the view itself and any runner_callback as locals
30 31 32 33 34 35 36 |
# File 'lib/assert/view/base.rb', line 30 def render(*args, &runner_callback) locals = { :view => self, :runner => runner_callback } Template.new(self.output_io, locals, &self.class.template) end |