Sha256: 2ef561a2ce09cc7acd8ee2e0bae64803b6791d531f96e47be4390702fadcfe3c
Contents?: true
Size: 904 Bytes
Versions: 6
Compression:
Stored size: 904 Bytes
Contents
# encoding: utf-8 module Imap module Backup module Configuration class List attr_reader :accounts def initialize(accounts = nil) if not Imap::Backup::Configuration::Store.exist? raise ConfigurationNotFound.new("Configuration file '#{Imap::Backup::Configuration::Store.default_pathname}' not found") end @config = Imap::Backup::Configuration::Store.new if accounts.nil? @accounts = @config.data[:accounts] else @accounts = @config.data[:accounts].select{ |account| accounts.include?(account[:username]) } end end def each_connection @accounts.each do |account| connection = Imap::Backup::Account::Connection.new(account) yield connection connection.disconnect end end end end end end
Version data entries
6 entries across 6 versions & 1 rubygems