Class: KRL_CMD::Update

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

Class Method Summary collapse

Class Method Details

.go(args) ⇒ Object



3
4
5
6
7
8
9
10
# File 'lib/update.rb', line 3

def self.go(args)
  version = args.to_s.empty? ? "development" : args.to_s.to_i
  require LIB_DIR + 'common'
  app = KRL_COMMON::get_app
  root_dir = Dir.pwd
  File.open(File.join(Dir.pwd, app.application_id + ".krl"), "w") { |f| f.print(app.krl(version)) }
  puts "Updated to version: #{version}"
end