class Superbot::Cloud::CLI::Organization::ListCommand
Public Instance Methods
execute()
click to toggle source
# File lib/superbot/cloud/cli/organization/list_command.rb, line 8 def execute list_organizations end
list_organizations()
click to toggle source
# File lib/superbot/cloud/cli/organization/list_command.rb, line 12 def list_organizations default_org = Superbot::Cloud.credentials[:organization] api_response = Superbot::Cloud::Api.request(:organization_list) puts "Your organizations:" puts(api_response.map { |org| org[:name] == default_org ? "#{org[:name]} (default)" : org[:name] }) end