Class: Imap::Backup::Setup::BackupPath

Inherits:
Object
  • Object
show all
Defined in:
lib/imap/backup/setup/backup_path.rb

Instance Method Summary collapse

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 = 
  @config = config
end

Instance Method Details

#runObject



12
13
14
15
16
17
18
# File 'lib/imap/backup/setup/backup_path.rb', line 12

def run
  .local_path = highline.ask("backup directory: ") do |q|
    q.default  = .local_path
    q.validate = ->(path) { path_modification_validator(path) }
    q.responses[:not_valid] = "Choose a different directory "
  end
end