Class: KRL_CMD::Create

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

Class Method Summary collapse

Class Method Details

.go(args) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
# File 'lib/create.rb', line 3

def self.go(args)
  raise "An application name must be specified" if args.to_s.empty?
  name = args.first
  desc = args.last # if description wasn't specified, set it to the name
  require LIB_DIR + 'user'
  require LIB_DIR + 'checkout'      
  user = KRL_CMD::User.new
  new_app = user.create_application(name, desc)
  KRL_CMD::Checkout.go(new_app.application_id)
  
end