Class: Imap::Backup::Setup::GlobalOptions::DownloadStrategyChooser

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(config:, highline:) ⇒ DownloadStrategyChooser

Returns a new instance of DownloadStrategyChooser.



12
13
14
15
# File 'lib/imap/backup/setup/global_options/download_strategy_chooser.rb', line 12

def initialize(config:, highline:)
  @config = config
  @highline = highline
end

Instance Attribute Details

#configObject (readonly)

Returns the value of attribute config.



9
10
11
# File 'lib/imap/backup/setup/global_options/download_strategy_chooser.rb', line 9

def config
  @config
end

#highlineObject (readonly)

Returns the value of attribute highline.



10
11
12
# File 'lib/imap/backup/setup/global_options/download_strategy_chooser.rb', line 10

def highline
  @highline
end

Instance Method Details

#runObject



17
18
19
20
21
22
23
24
# File 'lib/imap/backup/setup/global_options/download_strategy_chooser.rb', line 17

def run
  catch :done do
    loop do
      Kernel.system("clear")
      create_menu
    end
  end
end