Class: OsVm::Cli::App

Inherits:
Object
  • Object
show all
Includes:
GLI::App
Defined in:
lib/osvm/cli/app.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.getObject



7
8
9
10
11
# File 'lib/osvm/cli/app.rb', line 7

def self.get
  cli = new
  cli.setup
  cli
end

.runObject



13
14
15
# File 'lib/osvm/cli/app.rb', line 13

def self.run
  exit(get.run(ARGV))
end

Instance Method Details

#setupObject



17
18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/osvm/cli/app.rb', line 17

def setup
  program_desc 'vpsAdminOS test suite evaluator'
  version OsVm::VERSION
  subcommand_option_handling :normal
  preserve_argv true
  arguments :strict
  hide_commands_without_desc true

  desc 'Run ruby script'
  arg_name '<file> [args...]'
  command 'script' do |c|
    c.action(&Command.run(:script))
  end
end