Class: Backup::Storage::FTP
Instance Attribute Summary collapse
-
#ip ⇒ Object
Server IP Address and FTP port.
-
#passive_mode ⇒ Object
use passive mode?.
-
#password ⇒ Object
Server credentials.
-
#path ⇒ Object
Path to store backups to.
-
#port ⇒ Object
Server IP Address and FTP port.
-
#username ⇒ Object
Server credentials.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(model, storage_id = nil, &block) ⇒ FTP
constructor
Creates a new instance of the storage object.
Methods inherited from Base
Methods included from Configuration::Helpers
Constructor Details
#initialize(model, storage_id = nil, &block) ⇒ FTP
Creates a new instance of the storage object
29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/backup/storage/ftp.rb', line 29 def initialize(model, storage_id = nil, &block) super(model, storage_id) @port ||= 21 @path ||= 'backups' @passive_mode ||= false instance_eval(&block) if block_given? @path = path.sub(/^\~\//, '') end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Backup::Configuration::Helpers
Instance Attribute Details
#ip ⇒ Object
Server IP Address and FTP port
17 18 19 |
# File 'lib/backup/storage/ftp.rb', line 17 def ip @ip end |
#passive_mode ⇒ Object
use passive mode?
25 26 27 |
# File 'lib/backup/storage/ftp.rb', line 25 def passive_mode @passive_mode end |
#password ⇒ Object
Server credentials
13 14 15 |
# File 'lib/backup/storage/ftp.rb', line 13 def password @password end |
#path ⇒ Object
Path to store backups to
21 22 23 |
# File 'lib/backup/storage/ftp.rb', line 21 def path @path end |
#port ⇒ Object
Server IP Address and FTP port
17 18 19 |
# File 'lib/backup/storage/ftp.rb', line 17 def port @port end |
#username ⇒ Object
Server credentials
13 14 15 |
# File 'lib/backup/storage/ftp.rb', line 13 def username @username end |