From: Rubyist Rohit Date: 2011-08-05T01:05:44+09:00 Subject: Corrections in a Class Below is the code of my initial Class in the Ruby world. I want to make this Class a static class so that I can directly call methods, connectViaFTP and disconnectFTP. I also want to improve the way it is written. ================================================== require 'net/ftp' class EstablishRemoteConnection #Constants ServerName = "my FTP Server URL" UserName = "My Username" Password = "My Password" FilePath = "My remote Sub Folder" #FTP instance ftp=Net::FTP.new public def connectViaFTP ftp.connect(ServerName,21) ftp.login(UserName,Password) ftp.chdir(FilePath) #ftp.getbinaryfile(filename) end public def disconnectFTP ftp.close end end ================================================= -- Posted via http://www.ruby-forum.com/.