Class: Net::FTP::BufferedSocket
- Inherits:
-
BufferedIO
- Object
- BufferedIO
- Net::FTP::BufferedSocket
- Defined in:
- lib/rubysl/net/ftp/ftp.rb
Instance Method Summary collapse
Instance Method Details
#gets ⇒ Object
1100 1101 1102 1103 1104 |
# File 'lib/rubysl/net/ftp/ftp.rb', line 1100 def gets return readuntil("\n") rescue EOFError return nil end |
#read(len = nil) ⇒ Object
1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 |
# File 'lib/rubysl/net/ftp/ftp.rb', line 1086 def read(len = nil) if len s = super(len, "", true) return s.empty? ? nil : s else result = "" while s = super(DEFAULT_BLOCKSIZE, "", true) break if s.empty? result << s end return result end end |
#readline ⇒ Object
1106 1107 1108 |
# File 'lib/rubysl/net/ftp/ftp.rb', line 1106 def readline return readuntil("\n") end |