Class: ChunkedConnectionWrapper

Inherits:
Object
  • Object
show all
Defined in:
lib/client.rb

Instance Method Summary collapse

Constructor Details

#initialize(data, chunk_size) ⇒ ChunkedConnectionWrapper

Returns a new instance of ChunkedConnectionWrapper.



35
36
37
38
# File 'lib/client.rb', line 35

def initialize(data, chunk_size)
  @size = chunk_size
  @file = data
end

Instance Method Details

#eof!Object



44
45
46
# File 'lib/client.rb', line 44

def eof!
  @file.eof!
end

#eof?Boolean

Returns:

  • (Boolean)


47
48
49
# File 'lib/client.rb', line 47

def eof?
  @file.eof?
end

#read(foo) ⇒ Object



40
41
42
# File 'lib/client.rb', line 40

def read(foo)
  @file.read(@size)
end