Class: Imap::Backup::CLI::Accounts

Inherits:
Object
  • Object
show all
Includes:
Enumerable
Defined in:
lib/imap/backup/cli/accounts.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(required_accounts = []) ⇒ Accounts

Returns a new instance of Accounts.


9
10
11
# File 'lib/imap/backup/cli/accounts.rb', line 9

def initialize(required_accounts = [])
  @required_accounts = required_accounts
end

Instance Attribute Details

#required_accountsObject (readonly)

Returns the value of attribute required_accounts.


7
8
9
# File 'lib/imap/backup/cli/accounts.rb', line 7

def required_accounts
  @required_accounts
end

Instance Method Details

#each(&block) ⇒ Object


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

def each(&block)
  return enum_for(:each) if !block

  accounts.each(&block)
end