Class: ActionView::JSONStreamingBuffer

Inherits:
Object
  • Object
show all
Defined in:
ext/actionview/buffer.rb

Overview

:nodoc:

Instance Method Summary collapse

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