# File lib/net/ftp.rb, line 515 def gettextfile(remotefile, localfile = File.basename(remotefile), &block) # :yield: line f = open(localfile, "w") begin retrlines("RETR " + remotefile) do |line| f.puts(line) yield(line) if block end ensure f.close end end