Class: ActionView::AbstractRenderer::RenderedCollection
- Inherits:
-
Object
- Object
- ActionView::AbstractRenderer::RenderedCollection
- Defined in:
- lib/action_view/renderer/abstract_renderer.rb
Overview
:nodoc:
Defined Under Namespace
Classes: EmptyCollection
Instance Attribute Summary collapse
-
#rendered_templates ⇒ Object
readonly
Returns the value of attribute rendered_templates.
Class Method Summary collapse
Instance Method Summary collapse
- #body ⇒ Object
- #format ⇒ Object
-
#initialize(rendered_templates, spacer) ⇒ RenderedCollection
constructor
A new instance of RenderedCollection.
Constructor Details
#initialize(rendered_templates, spacer) ⇒ RenderedCollection
Returns a new instance of RenderedCollection.
117 118 119 120 |
# File 'lib/action_view/renderer/abstract_renderer.rb', line 117 def initialize(rendered_templates, spacer) @rendered_templates = rendered_templates @spacer = spacer end |
Instance Attribute Details
#rendered_templates ⇒ Object (readonly)
Returns the value of attribute rendered_templates.
115 116 117 |
# File 'lib/action_view/renderer/abstract_renderer.rb', line 115 def rendered_templates @rendered_templates end |
Class Method Details
.empty(format) ⇒ Object
111 112 113 |
# File 'lib/action_view/renderer/abstract_renderer.rb', line 111 def self.empty(format) EmptyCollection.new format end |
Instance Method Details
#body ⇒ Object
122 123 124 |
# File 'lib/action_view/renderer/abstract_renderer.rb', line 122 def body @rendered_templates.map(&:body).join(@spacer.body).html_safe end |
#format ⇒ Object
126 127 128 |
# File 'lib/action_view/renderer/abstract_renderer.rb', line 126 def format rendered_templates.first.format end |