Class: Imap::Backup::CLI::Stats
- Inherits:
-
Thor
- Object
- Thor
- Imap::Backup::CLI::Stats
- Includes:
- Helpers, Thor::Actions
- Defined in:
- lib/imap/backup/cli/stats.rb
Overview
Prints various statistics about an account and its backup
Instance Method Summary collapse
-
#initialize(email, options) ⇒ Stats
constructor
A new instance of Stats.
- #run ⇒ void
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, ) super([]) @email = email @options = end |
Instance Method Details
#run ⇒ void
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 [:format] when "json" Kernel.puts stats.to_json else format_text stats end end end |