Class: FTPMVC::Ftpd::Input

Inherits:
Object
  • Object
show all
Includes:
Input
Defined in:
lib/ftpmvc/ftpd/input.rb

Instance Method Summary collapse

Methods included from Input

#read_all

Constructor Details

#initialize(stream) ⇒ Input

Returns a new instance of Input.



9
10
11
# File 'lib/ftpmvc/ftpd/input.rb', line 9

def initialize(stream)
  @stream = stream
end

Instance Method Details

#readObject



13
14
15
16
17
# File 'lib/ftpmvc/ftpd/input.rb', line 13

def read
  while chunk = @stream.read
    yield chunk
  end
end