Class: FileTransfer::Generic
- Inherits:
-
Object
- Object
- FileTransfer::Generic
- Defined in:
- lib/file_transfer/generic.rb
Instance Attribute Summary collapse
-
#host ⇒ Object
Returns the value of attribute host.
-
#password ⇒ Object
Returns the value of attribute password.
-
#port ⇒ Object
Returns the value of attribute port.
-
#username ⇒ Object
Returns the value of attribute username.
Instance Method Summary collapse
- #close ⇒ Object
- #download(from_path, to_path) ⇒ Object
- #exist?(file_path) ⇒ Boolean
-
#initialize(options = {}) ⇒ Generic
constructor
A new instance of Generic.
- #list(dir, filter = "") ⇒ Object
- #move(file_name, from_dir, to_dir) ⇒ Object
- #upload(from_path, to_path) ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Generic
Returns a new instance of Generic.
7 8 9 10 11 12 |
# File 'lib/file_transfer/generic.rb', line 7 def initialize( = {}) @host = [:host] || "localhost" @username = [:username] || "anonymous" @password = [:password] || "" @port = [:port] || 21 end |
Instance Attribute Details
#host ⇒ Object
Returns the value of attribute host.
5 6 7 |
# File 'lib/file_transfer/generic.rb', line 5 def host @host end |
#password ⇒ Object
Returns the value of attribute password.
5 6 7 |
# File 'lib/file_transfer/generic.rb', line 5 def password @password end |
#port ⇒ Object
Returns the value of attribute port.
5 6 7 |
# File 'lib/file_transfer/generic.rb', line 5 def port @port end |
#username ⇒ Object
Returns the value of attribute username.
5 6 7 |
# File 'lib/file_transfer/generic.rb', line 5 def username @username end |
Instance Method Details
#close ⇒ Object
29 30 |
# File 'lib/file_transfer/generic.rb', line 29 def close end |
#download(from_path, to_path) ⇒ Object
20 21 |
# File 'lib/file_transfer/generic.rb', line 20 def download(from_path, to_path) end |
#exist?(file_path) ⇒ Boolean
26 27 |
# File 'lib/file_transfer/generic.rb', line 26 def exist?(file_path) end |
#list(dir, filter = "") ⇒ Object
14 15 |
# File 'lib/file_transfer/generic.rb', line 14 def list(dir, filter="") end |
#move(file_name, from_dir, to_dir) ⇒ Object
23 24 |
# File 'lib/file_transfer/generic.rb', line 23 def move(file_name, from_dir, to_dir) end |
#upload(from_path, to_path) ⇒ Object
17 18 |
# File 'lib/file_transfer/generic.rb', line 17 def upload(from_path, to_path) end |