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.
37 38 39 40 |
# File 'lib/action_view/renderer/abstract_renderer.rb', line 37 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.
35 36 37 |
# File 'lib/action_view/renderer/abstract_renderer.rb', line 35 def rendered_templates @rendered_templates end |
Class Method Details
.empty(format) ⇒ Object
31 32 33 |
# File 'lib/action_view/renderer/abstract_renderer.rb', line 31 def self.empty(format) EmptyCollection.new format end |
Instance Method Details
#body ⇒ Object
42 43 44 |
# File 'lib/action_view/renderer/abstract_renderer.rb', line 42 def body @rendered_templates.map(&:body).join(@spacer.body).html_safe end |
#format ⇒ Object
46 47 48 |
# File 'lib/action_view/renderer/abstract_renderer.rb', line 46 def format rendered_templates.first.format end |