Class: Imap::Backup::Setup::Account

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

Defined Under Namespace

Classes: Header

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(config, account, highline) ⇒ Account

Returns a new instance of Account.


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

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

Instance Attribute Details

#accountObject (readonly)

Returns the value of attribute account.


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

def 
  @account
end

#configObject (readonly)

Returns the value of attribute config.


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

def config
  @config
end

#highlineObject (readonly)

Returns the value of attribute highline.


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

def highline
  @highline
end

Instance Method Details

#runObject


19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/imap/backup/setup/account.rb', line 19

def run
  if !.local_path
    .local_path = File.join(config.path, .username.tr("@", "_"))
  end

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