Sha256: b433a4a15702ae4776d18734ae002da8b04cc35f986fd9695b74e895c224c72a

Contents?: true

Size: 649 Bytes

Versions: 3

Compression:

Stored size: 649 Bytes

Contents

class Ey::Core::Cli::Applications < Ey::Core::Cli::Subcommand
  title "applications"
  summary "Retrieve a list of Engine Yard applications that you have access to."
  option :account, short: 'c', long: 'account', description: 'Filter by account name or id', argument: 'Account'

  def handle
    applications = if option(:account)
                     core_account_for(options).applications.all
                   else
                     current_accounts.map(&:applications).flatten.sort_by(&:id)
                   end

    table_data = TablePrint::Printer.new(applications, [{id: {width: 10}}, :name])
    puts table_data.table_print
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ey-core-3.1.2 lib/ey-core/cli/applications.rb
ey-core-3.1.1 lib/ey-core/cli/applications.rb
ey-core-3.1.0 lib/ey-core/cli/applications.rb