Class: Ace::Overseer::CLI::Commands::Status
- Inherits:
-
Support::Cli::Command
- Object
- Support::Cli::Command
- Ace::Overseer::CLI::Commands::Status
- Includes:
- Support::Cli::Base
- Defined in:
- lib/ace/overseer/cli/commands/status.rb
Instance Method Summary collapse
- #call(format:, **options) ⇒ Object
-
#initialize(collector: nil, config: nil) ⇒ Status
constructor
A new instance of Status.
Constructor Details
#initialize(collector: nil, config: nil) ⇒ Status
Returns a new instance of Status.
19 20 21 22 23 |
# File 'lib/ace/overseer/cli/commands/status.rb', line 19 def initialize(collector: nil, config: nil) super() @collector = collector || Organisms::StatusCollector.new @config = config end |
Instance Method Details
#call(format:, **options) ⇒ Object
25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/ace/overseer/cli/commands/status.rb', line 25 def call(format:, **) Atoms::RepoGuard.ensure_repo! return if [:quiet] if [:watch] && format != "json" run_watch_loop(format, ) else run_once(format) end rescue Interrupt nil rescue => e raise Ace::Support::Cli::Error.new(e.) end |