Sha256: 87f76a0b5540cca19b3775357b36de29192d9ea8197ecc84a2c5e1bce062471f

Contents?: true

Size: 349 Bytes

Versions: 7

Compression:

Stored size: 349 Bytes

Contents

desc 'List accounts'
arg_name '[account-id...]'
command [:list] do |c|
  c.action do |global_options, options, args|

    if args.empty?
      accounts = Account.find(:all)
    else
      accounts = Account.find_or_call(args) do |id|
        warn "Couldn't find account #{id}"
      end
    end

    render_table(accounts, global_options)
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
bbcloud-0.11.2 lib/bbcloud/commands/accounts-list.rb
bbcloud-0.11.1 lib/bbcloud/commands/accounts-list.rb
bbcloud-0.11.0 lib/bbcloud/commands/accounts-list.rb
bbcloud-0.10.1 lib/bbcloud/commands/accounts-list.rb
bbcloud-0.9.2 lib/bbcloud/commands/accounts-list.rb
bbcloud-0.9.1 lib/bbcloud/commands/accounts-list.rb
bbcloud-0.9 lib/bbcloud/commands/accounts-list.rb