Class: Imap::Backup::Setup::BackupPath
- Inherits:
-
Object
- Object
- Imap::Backup::Setup::BackupPath
- Defined in:
- lib/imap/backup/setup/backup_path.rb
Instance Method Summary collapse
-
#initialize(account:, config:) ⇒ BackupPath
constructor
A new instance of BackupPath.
- #run ⇒ Object
Constructor Details
#initialize(account:, config:) ⇒ BackupPath
Returns a new instance of BackupPath.
7 8 9 10 |
# File 'lib/imap/backup/setup/backup_path.rb', line 7 def initialize(account:, config:) @account = account @config = config end |
Instance Method Details
#run ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/imap/backup/setup/backup_path.rb', line 12 def run account.local_path = highline.ask("backup directory: ") do |q| q.default = account.local_path q.validate = ->(path) { path_modification_validator(path) } q.responses[:not_valid] = "Choose a different directory " end end |