Sha256: 420c20f8b7a3676e14690bf4189c93833221b118f338c6f4b4a39649c026edbf
Contents?: true
Size: 834 Bytes
Versions: 30
Compression:
Stored size: 834 Bytes
Contents
require 'ey-core/cli/subcommand' module Ey module Core module Cli class Applications < 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 table_data = TablePrint::Printer.new( applications, [{id: {width: 10}}, :name] ) puts table_data.table_print end private def applications if option(:account) core_account.applications.all else core_accounts.map(&:applications).flatten.sort_by(&:id) end end end end end end
Version data entries
30 entries across 30 versions & 2 rubygems