Class: Imap::Backup::CLI::Stats

Inherits:
Thor
  • Object
show all
Includes:
Helpers, Thor::Actions
Defined in:
lib/imap/backup/cli/stats.rb

Overview

Prints various statistics about an account and its backup

Constant Summary

Constants included from Helpers

Helpers::NAMESPACE_CONFIGURATION_DESCRIPTION

Instance Method Summary collapse

Methods included from Helpers

#account, included, #load_config, #requested_accounts

Constructor Details

#initialize(email, options) ⇒ Stats

Returns a new instance of Stats.

 12 13 14 15 16
# File 'lib/imap/backup/cli/stats.rb', line 12 def initialize(email, options) super([]) @email = email @options = options end

Instance Method Details

#runvoid

This method returns an undefined value.

 20 21 22 23 24 25 26 27 28 29
# File 'lib/imap/backup/cli/stats.rb', line 20 no_commands do def run case options[:format] when "json" Kernel.puts stats.to_json else format_text stats end end end