Last Modified
2013-08-12 08:13:54 +0000
Requires
  • net/ftp
  • net/netrc

Description

net/ftp-netrc.rb - Net::FTP / Net::Netrc integration

Copyright (c) 2005-2009 Bob Showalter

This library is distributed under the terms of the Ruby license. You may freely distribute or modify this library.

This module extends the Net::FTP#login method to use Net::Netrc to lookup login information if a nil username is passed.

Example:

require 'net/ftp-netrc'     # (brings in net/ftp and net/netrc)

ftp = Net::FTP.new('myhost')
ftp.login(nil)
ftp.last_response
=> 230 User myuser logged in.