Class: ActivePath::Renderer::PartialRenderer
- Inherits:
-
Object
- Object
- ActivePath::Renderer::PartialRenderer
- Includes:
- Conditional, PathHints
- Defined in:
- lib/active_path/renderer/partial_renderer.rb
Instance Attribute Summary collapse
-
#context ⇒ Object
readonly
Returns the value of attribute context.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
-
#initialize(context, options = {}) ⇒ PartialRenderer
constructor
A new instance of PartialRenderer.
- #render ⇒ Object
Methods included from PathHints
#end_path_hints, #start_path_hints
Methods included from Conditional
#condition_match?, #conditions_match?, #hash_match?, #proc_match?
Constructor Details
#initialize(context, options = {}) ⇒ PartialRenderer
Returns a new instance of PartialRenderer.
10 11 12 13 |
# File 'lib/active_path/renderer/partial_renderer.rb', line 10 def initialize(context, = {}) @context = context @options = end |
Instance Attribute Details
#context ⇒ Object (readonly)
Returns the value of attribute context.
6 7 8 |
# File 'lib/active_path/renderer/partial_renderer.rb', line 6 def context @context end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
6 7 8 |
# File 'lib/active_path/renderer/partial_renderer.rb', line 6 def @options end |
Instance Method Details
#render ⇒ Object
15 16 17 18 19 20 |
# File 'lib/active_path/renderer/partial_renderer.rb', line 15 def render output_buffer = yield prepend_to(output_buffer) append_to(output_buffer) output_buffer end |