Class: Protocol::Rack::Body::Streaming::Output

Inherits:
Object
  • Object
show all
Defined in:
lib/protocol/rack/body/streaming.rb

Instance Method Summary collapse

Constructor Details

#initialize(block) ⇒ Output

Returns a new instance of Output.



36
37
38
# File 'lib/protocol/rack/body/streaming.rb', line 36

def initialize(block)
	@block = block
end

Instance Method Details

#closeObject



44
45
46
# File 'lib/protocol/rack/body/streaming.rb', line 44

def close
	@block = nil
end

#empty?Boolean

Returns:

  • (Boolean)


48
49
50
# File 'lib/protocol/rack/body/streaming.rb', line 48

def empty?
	true
end

#write(chunk) ⇒ Object



40
41
42
# File 'lib/protocol/rack/body/streaming.rb', line 40

def write(chunk)
	@block.call(chunk)
end