Module: Aptible::CLI::Subcommands::Apps
- Included in:
- Agent
- Defined in:
- lib/aptible/cli/subcommands/apps.rb
Class Method Summary collapse
-
.included(thor) ⇒ Object
rubocop:disable MethodLength.
Class Method Details
.included(thor) ⇒ Object
rubocop:disable MethodLength
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/aptible/cli/subcommands/apps.rb', line 6 def self.included(thor) thor.class_eval do include Helpers::Account desc 'apps:create HANDLE', 'Create a new application' option :account define_method 'apps:create' do |handle| account = ensure_account() app = account.create_app(handle: handle) if app.errors.any? fail app.errors..first else say "App #{handle} created!" end end end end |