Class: Imap::Backup::Account::Connection::FolderNames

Inherits:
Object
  • Object
show all
Defined in:
lib/imap/backup/account/connection/folder_names.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client:, account:) ⇒ FolderNames

Returns a new instance of FolderNames.


9
10
11
12
# File 'lib/imap/backup/account/connection/folder_names.rb', line 9

def initialize(client:, account:)
  @client = client
  @account = 
end

Instance Attribute Details

#accountObject (readonly)

Returns the value of attribute account.


6
7
8
# File 'lib/imap/backup/account/connection/folder_names.rb', line 6

def 
  @account
end

#clientObject (readonly)

Returns the value of attribute client.


7
8
9
# File 'lib/imap/backup/account/connection/folder_names.rb', line 7

def client
  @client
end

Instance Method Details

#runObject


14
15
16
17
18
19
20
21
22
23
24
# File 'lib/imap/backup/account/connection/folder_names.rb', line 14

def run
  folder_names = client.list

  if folder_names.empty?
    message = "Unable to get folder list for account #{.username}"
    Logger.logger.info message
    raise message
  end

  folder_names
end