Class: KRL_CMD::Create

Inherits:
Object
  • Object
show all
Defined in:
lib/create.rb

Class Method Summary collapse

Class Method Details

.go(name, options) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/create.rb', line 3

def self.go(name, options)
  desc = options["description"] ? options["description"] : name
  user = KRL_CMD::User.new

  begin
    new_app = user.create_application(name, desc)
  rescue Exception => error
    puts error.message
    exit
  end

  checkout_opts = {
    "title" => options["title"]
  }
  KRL_CMD::Checkout.go(new_app.application_id, checkout_opts)
  
end