ftp-netrc.rb

Path: lib/net/ftp-netrc.rb
Last Update: Sun Dec 05 12:28:03 +0000 2010

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.

Required files

net/ftp   net/netrc  

[Validate]