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.



53
54
55
# File 'lib/protocol/rack/body/streaming.rb', line 53

def initialize(block)
	@block = block
end

Instance Method Details

#closeObject



61
62
63
# File 'lib/protocol/rack/body/streaming.rb', line 61

def close
	@block = nil
end

#empty?Boolean

Returns:

  • (Boolean)


65
66
67
# File 'lib/protocol/rack/body/streaming.rb', line 65

def empty?
	true
end

#write(chunk) ⇒ Object



57
58
59
# File 'lib/protocol/rack/body/streaming.rb', line 57

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