Sha256: 2ea0fafb418cb052465775dcbaf2735a9e5604a1b0412f087ed57a5f36f6edf0

Contents?: true

Size: 608 Bytes

Versions: 14

Compression:

Stored size: 608 Bytes

Contents

module Imap::Backup
  class CLI::Folders < Thor
    include Thor::Actions
    include CLI::Helpers

    attr_reader :account_names

    def initialize(options)
      super([])
      @account_names = (options[:accounts] || "").split(",")
    end

    no_commands do
      def run
        each_connection(account_names) do |connection|
          puts connection.username
          folders = connection.folders
          if folders.nil?
            warn "Unable to list account folders"
            return false
          end
          folders.each { |f| puts "\t#{f}" }
        end
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
imap-backup-4.0.7 lib/imap/backup/cli/folders.rb
imap-backup-4.0.6 lib/imap/backup/cli/folders.rb
imap-backup-4.0.5 lib/imap/backup/cli/folders.rb
imap-backup-4.0.4 lib/imap/backup/cli/folders.rb
imap-backup-4.0.3 lib/imap/backup/cli/folders.rb
imap-backup-4.0.2 lib/imap/backup/cli/folders.rb
imap-backup-4.0.1 lib/imap/backup/cli/folders.rb
imap-backup-4.0.0 lib/imap/backup/cli/folders.rb
imap-backup-4.0.0.rc6 lib/imap/backup/cli/folders.rb
imap-backup-4.0.0.rc5 lib/imap/backup/cli/folders.rb
imap-backup-4.0.0.rc4 lib/imap/backup/cli/folders.rb
imap-backup-4.0.0.rc3 lib/imap/backup/cli/folders.rb
imap-backup-4.0.0.rc2 lib/imap/backup/cli/folders.rb
imap-backup-4.0.0.rc1 lib/imap/backup/cli/folders.rb