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

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

Defined Under Namespace

Classes: DownloadStrategyChooser

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(config:, highline:) ⇒ GlobalOptions

Returns a new instance of GlobalOptions.



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

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

Instance Attribute Details

#configObject (readonly)

Returns the value of attribute config.



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

def config
  @config
end

#highlineObject (readonly)

Returns the value of attribute highline.



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

def highline
  @highline
end

Instance Method Details

#runObject



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

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