Class: Backup::Storage::FTP
- Includes:
- Cycler
- Defined in:
- lib/backup/storage/ftp.rb
Instance Attribute Summary collapse
-
#ip ⇒ Object
Server IP Address and FTP port.
-
#passive_mode ⇒ Object
Use passive mode?.
-
#password ⇒ Object
Server credentials.
-
#port ⇒ Object
Server IP Address and FTP port.
- #timeout ⇒ Integer|Float
-
#username ⇒ Object
Server credentials.
Attributes inherited from Base
#keep, #model, #package, #path, #storage_id
Instance Method Summary collapse
-
#initialize(model, storage_id = nil) ⇒ FTP
constructor
A new instance of FTP.
Methods inherited from Base
Methods included from Config::Helpers
Constructor Details
#initialize(model, storage_id = nil) ⇒ FTP
Returns a new instance of FTP.
30 31 32 33 34 35 36 37 38 |
# File 'lib/backup/storage/ftp.rb', line 30 def initialize(model, storage_id = nil) super @port ||= 21 @path ||= 'backups' @passive_mode ||= false @timeout ||= nil path.sub!(/^~\//, '') end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Backup::Config::Helpers
Instance Attribute Details
#ip ⇒ Object
Server IP Address and FTP port
15 16 17 |
# File 'lib/backup/storage/ftp.rb', line 15 def ip @ip end |
#passive_mode ⇒ Object
Use passive mode?
19 20 21 |
# File 'lib/backup/storage/ftp.rb', line 19 def passive_mode @passive_mode end |
#password ⇒ Object
Server credentials
11 12 13 |
# File 'lib/backup/storage/ftp.rb', line 11 def password @password end |
#port ⇒ Object
Server IP Address and FTP port
15 16 17 |
# File 'lib/backup/storage/ftp.rb', line 15 def port @port end |
#timeout ⇒ Integer|Float
28 29 30 |
# File 'lib/backup/storage/ftp.rb', line 28 def timeout @timeout end |
#username ⇒ Object
Server credentials
11 12 13 |
# File 'lib/backup/storage/ftp.rb', line 11 def username @username end |