Class: ActionView::OutputFlow
- Defined in:
- actionpack/lib/action_view/flows.rb
Overview
:nodoc:
Direct Known Subclasses
Instance Attribute Summary collapse
-
#content ⇒ Object
readonly
Returns the value of attribute content.
Instance Method Summary collapse
-
#append(key, value) ⇒ Object
Called by content_for.
-
#append!(key, value) ⇒ Object
Called by provide.
-
#get(key) ⇒ Object
Called by _layout_for to read stored values.
-
#initialize ⇒ OutputFlow
constructor
A new instance of OutputFlow.
-
#set(key, value) ⇒ Object
Called by each renderer object to set the layout contents.
Constructor Details
#initialize ⇒ OutputFlow
Returns a new instance of OutputFlow.
7 8 9 |
# File 'actionpack/lib/action_view/flows.rb', line 7 def initialize @content = Hash.new { |h,k| h[k] = ActiveSupport::SafeBuffer.new } end |
Instance Attribute Details
#content ⇒ Object (readonly)
Returns the value of attribute content
5 6 7 |
# File 'actionpack/lib/action_view/flows.rb', line 5 def content @content end |
Instance Method Details
#append(key, value) ⇒ Object
Called by content_for
22 23 24 |
# File 'actionpack/lib/action_view/flows.rb', line 22 def append(key, value) @content[key] << value end |
#append!(key, value) ⇒ Object
Called by provide
27 28 29 |
# File 'actionpack/lib/action_view/flows.rb', line 27 def append!(key, value) @content[key] << value end |
#get(key) ⇒ Object
Called by _layout_for to read stored values.
12 13 14 |
# File 'actionpack/lib/action_view/flows.rb', line 12 def get(key) @content[key] end |
#set(key, value) ⇒ Object
Called by each renderer object to set the layout contents.
17 18 19 |
# File 'actionpack/lib/action_view/flows.rb', line 17 def set(key, value) @content[key] = value end |