Created
October 17, 2012 17:25
-
-
Save chmurph2/3906869 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'niftp' | |
class SomeObject | |
include NiFTP | |
def ftp_stuff | |
# get a file from an FTP Secure (FTPS) server | |
ftp("ftp.appareldownload.com", { username: "changeme", password: "changeme", ftps: true }) do |client| | |
p "Connected to Alpha! Buyakasha!" | |
files = client.list('s*') | |
p "the files in the root dir: #{files}" | |
# ... | |
file = client.gettextfile('shipments-alp-1087534.txt', 'shipments-alp-1087534.txt', 1024) | |
# ... | |
end | |
end | |
end | |
SomeObject.new.ftp_stuff |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment