Class: ShapeupCli::Commands::Orgs

Inherits:
Base
  • Object
show all
Defined in:
lib/shapeup_cli/commands/orgs.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#agent_help?, #initialize, run

Constructor Details

This class inherits a constructor from ShapeupCli::Commands::Base

Class Method Details

.metadataObject



6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/shapeup_cli/commands/orgs.rb', line 6

def self.
  {
    command: "orgs",
    path: "shapeup orgs",
    short: "List organisations you have access to",
    flags: [],
    examples: [
      "shapeup orgs",
      "shapeup orgs --json"
    ]
  }
end

Instance Method Details

#executeObject



19
20
21
22
23
24
25
26
27
28
# File 'lib/shapeup_cli/commands/orgs.rb', line 19

def execute
  result = client.call_tool("list_organisations")

  render result,
    summary: "Organisations",
    breadcrumbs: [
      { cmd: "shapeup pitches list --org <id>", description: "List pitches for an org" },
      { cmd: "shapeup cycles --org <id>", description: "List cycles for an org" }
    ]
end