Class: Imap::Backup::Setup::Account::Header
- Inherits:
-
Object
- Object
- Imap::Backup::Setup::Account::Header
- Defined in:
- lib/imap/backup/setup/account/header.rb
Instance Attribute Summary collapse
-
#account ⇒ Object
readonly
Returns the value of attribute account.
-
#menu ⇒ Object
readonly
Returns the value of attribute menu.
Instance Method Summary collapse
-
#initialize(menu:, account:) ⇒ Header
constructor
A new instance of Header.
- #run ⇒ Object
Constructor Details
#initialize(menu:, account:) ⇒ Header
11 12 13 14 |
# File 'lib/imap/backup/setup/account/header.rb', line 11 def initialize(menu:, account:) = @account = account end |
Instance Attribute Details
#account ⇒ Object (readonly)
Returns the value of attribute account.
8 9 10 |
# File 'lib/imap/backup/setup/account/header.rb', line 8 def account @account end |
#menu ⇒ Object (readonly)
Returns the value of attribute menu.
9 10 11 |
# File 'lib/imap/backup/setup/account/header.rb', line 9 def end |
Instance Method Details
#run ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/imap/backup/setup/account/header.rb', line 16 def run .header = " \#{helpers.title_prefix} Account\#{modified_flag}\n\n email \#{space}\#{account.username}\n password\#{space}\#{masked_password}\n path \#{space}\#{local_path}\n folders \#{space}\#{folders.map { |f| f[:name] }.join(', ')}\#{mirror_mode}\#{multi_fetch_size}\n server \#{space}\#{account.server}\#{connection_options}\#{reset_seen_flags_after_fetch}\n\n Choose an action\n HEADER\nend\n".chomp |