Class: ActionView::JSONStreamingBuffer
- Inherits:
-
Object
- Object
- ActionView::JSONStreamingBuffer
- Defined in:
- ext/actionview/buffer.rb
Overview
:nodoc:
Instance Method Summary collapse
- #<<(value) ⇒ Object (also: #write, #concat, #append=, #safe_concat, #safe_append=)
-
#initialize(block) ⇒ JSONStreamingBuffer
constructor
A new instance of JSONStreamingBuffer.
Constructor Details
#initialize(block) ⇒ JSONStreamingBuffer
Returns a new instance of JSONStreamingBuffer.
11 12 13 |
# File 'ext/actionview/buffer.rb', line 11 def initialize(block) @block = block end |
Instance Method Details
#<<(value) ⇒ Object Also known as: write, concat, append=, safe_concat, safe_append=
15 16 17 |
# File 'ext/actionview/buffer.rb', line 15 def <<(value) @block.call(value.to_s) end |