Class: Flatrack::View::OutputBuffer
- Inherits:
-
ActiveSupport::SafeBuffer
- Object
- ActiveSupport::SafeBuffer
- Flatrack::View::OutputBuffer
- Defined in:
- lib/flatrack/view/output_buffer.rb
Overview
A modified output buffer for block evaluation
Instance Method Summary collapse
-
#<<(value) ⇒ OutputBuffer
(also: #append=)
appends text to the buffer.
-
#initialize ⇒ OutputBuffer
constructor
Initializes and encodes the buffer.
-
#safe_concat(value) ⇒ OutputBuffer
(also: #safe_append=)
safely concatenates value to the buffer.
Constructor Details
#initialize ⇒ OutputBuffer
Initializes and encodes the buffer
6 7 8 9 |
# File 'lib/flatrack/view/output_buffer.rb', line 6 def initialize(*) super encode! end |
Instance Method Details
#<<(value) ⇒ OutputBuffer Also known as: append=
appends text to the buffer
14 15 16 17 |
# File 'lib/flatrack/view/output_buffer.rb', line 14 def <<(value) return self if value.nil? super(value.to_s) end |
#safe_concat(value) ⇒ OutputBuffer Also known as: safe_append=
safely concatenates value to the buffer
24 25 26 27 |
# File 'lib/flatrack/view/output_buffer.rb', line 24 def safe_concat(value) return self if value.nil? super(value.to_s) end |