Class: Imap::Backup::Configuration::FolderChooser

Inherits:
Object
  • Object
show all
Defined in:
lib/imap/backup/configuration/folder_chooser.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(account) ⇒ FolderChooser

Returns a new instance of FolderChooser.



7
8
9
# File 'lib/imap/backup/configuration/folder_chooser.rb', line 7

def initialize()
  @account = 
end

Instance Attribute Details

#accountObject (readonly)

Returns the value of attribute account.



5
6
7
# File 'lib/imap/backup/configuration/folder_chooser.rb', line 5

def 
  @account
end

Instance Method Details

#runObject



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/imap/backup/configuration/folder_chooser.rb', line 11

def run
  if connection.nil?
    Imap::Backup.logger.warn "Connection failed"
    highline.ask "Press a key "
    return
  end

  if folders.nil?
    Imap::Backup.logger.warn "Unable to get folder list"
    highline.ask "Press a key "
    return
  end

  remove_missing

  catch :done do
    loop do
      Kernel.system("clear")
      show_menu
    end
  end
end