Class: Rockit::Cli

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

Class Method Summary collapse

Class Method Details

.start(args = ARGV) ⇒ Object

Run the cli. Additional commands supplied will be executed after the Rockit::Application finishes successfully.

args - will look for -f as the first argument which will cause a

hard delete of the cache directory before running


12
13
14
15
16
17
18
19
20
# File 'lib/rockit/cli.rb', line 12

def self.start(args=ARGV)
  rockitapp = Rockit::Application.new
  if args[0] == '-f'
    args.shift
    rockitapp.clear_cache
  end
  rockitapp.run
  Kernel.exec(*args) unless args.size == 0
end