class RedHatSupportLib::Network::FtpConnection
Public Class Methods
new(host)
click to toggle source
# File lib/network/ftp_connection.rb, line 5 def initialize(host) @host = host end
Public Instance Methods
upload(file_name, remote_directory)
click to toggle source
# File lib/network/ftp_connection.rb, line 9 def upload(file_name, remote_directory) Net::FTP.open(@host) do |ftp| ftp.login files = ftp.chdir(remote_directory) ftp.putbinaryfile(file_name) end end