Class: Ace::Overseer::CLI::Commands::Projects

Inherits:
Support::Cli::Command
  • Object
show all
Includes:
Support::Cli::Base
Defined in:
lib/ace/overseer/cli/commands/projects.rb

Instance Method Summary collapse

Constructor Details

#initialize(client: nil) ⇒ Projects

Returns a new instance of Projects.



10
11
12
13
# File 'lib/ace/overseer/cli/commands/projects.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/projects.rb', line 14

def call(**)
  puts JSON.pretty_generate(@client.call("project", "list", "--json"))
rescue => error
  raise Ace::Support::Cli::Error.new(error.message)
end