Sha256: 6625c1d1cf4780a64385f127d52ff3b51d7bf06880b2db0adcb70e801404d779

Contents?: true

Size: 607 Bytes

Versions: 4

Compression:

Stored size: 607 Bytes

Contents

module Brightbox

  command [:accounts] do |cmd|

    cmd.desc "Refuses or removes an account collaboration"
    cmd.arg_name "account_id"
    cmd.command [:remove] do |c|
      c.action do |global_options, options, args|
        account_id = args.first

        # Find the collaboration for that account
        collaboration = UserCollaboration.get_for_account(account_id)
        if collaboration
          collaboration.remove
        else
          raise "Couldn't find an invite for account #{account_id}"
        end

        render_table([collaboration], global_options)
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
brightbox-cli-1.1.0 lib/brightbox-cli/commands/accounts-remove.rb
brightbox-cli-1.0.0 lib/brightbox-cli/commands/accounts-remove.rb
brightbox-cli-1.0.0.rc2 lib/brightbox-cli/commands/accounts-remove.rb
brightbox-cli-1.0.0.rc1 lib/brightbox-cli/commands/accounts-remove.rb