Class: ActionView::OutputBuffer
- Inherits:
-
ActiveSupport::SafeBuffer
- Object
- ActiveSupport::SafeBuffer
- ActionView::OutputBuffer
- Defined in:
- lib/action_view/template/handlers/erb.rb
Instance Method Summary collapse
- #<<(value) ⇒ Object (also: #append=)
- #append_if_string=(value) ⇒ Object
-
#initialize ⇒ OutputBuffer
constructor
A new instance of OutputBuffer.
Constructor Details
#initialize ⇒ OutputBuffer
Returns a new instance of OutputBuffer.
8 9 10 11 |
# File 'lib/action_view/template/handlers/erb.rb', line 8 def initialize(*) super encode! if encoding_aware? end |
Instance Method Details
#<<(value) ⇒ Object Also known as: append=
13 14 15 |
# File 'lib/action_view/template/handlers/erb.rb', line 13 def <<(value) super(value.to_s) end |
#append_if_string=(value) ⇒ Object
19 20 21 22 23 24 |
# File 'lib/action_view/template/handlers/erb.rb', line 19 def append_if_string=(value) if value.is_a?(String) && !value.is_a?(NonConcattingString) ActiveSupport::Deprecation.warn("<% %> style block helpers are deprecated. Please use <%= %>", caller) self << value end end |