Class: Ace::Overseer::CLI::Commands::Agents
- Inherits:
-
Support::Cli::Command
- Object
- Support::Cli::Command
- Ace::Overseer::CLI::Commands::Agents
- Includes:
- Support::Cli::Base
- Defined in:
- lib/ace/overseer/cli/commands/agents.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(client: nil) ⇒ Agents
constructor
A new instance of Agents.
Constructor Details
#initialize(client: nil) ⇒ Agents
Returns a new instance of Agents.
10 11 12 13 |
# File 'lib/ace/overseer/cli/commands/agents.rb', line 10 def initialize(client: nil) super() @client = client || Molecules::LabClient.new end |
Instance Method Details
#call ⇒ Object
14 15 16 17 18 |
# File 'lib/ace/overseer/cli/commands/agents.rb', line 14 def call(**) puts JSON.pretty_generate(@client.call("agents", "--json")) rescue => error raise Ace::Support::Cli::Error.new(error.) end |