Class: Superbot::Cloud::CLI::Organization::ListCommand

Inherits:
Clamp::Command
  • Object
show all
Defined in:
lib/superbot/cloud/cli/organization/list_command.rb

Instance Method Summary collapse

Instance Method Details

#executeObject



8
9
10
# File 'lib/superbot/cloud/cli/organization/list_command.rb', line 8

def execute
  list_organizations
end

#list_organizationsObject



12
13
14
15
# File 'lib/superbot/cloud/cli/organization/list_command.rb', line 12

def list_organizations
  api_response = Superbot::Cloud::Api.request(:organization_list)
  puts(api_response.map { |org| org[:name] })
end