Class: S3sec::CLI

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

Overview

Handle the application command line parsing and the dispatch to various command objects

Constant Summary collapse

Error =

Error raised by this runner

Class.new(StandardError)

Instance Method Summary collapse

Instance Method Details

#checkObject



24
25
26
27
28
29
30
31
# File 'lib/s3sec/cli.rb', line 24

def check(*)
  if options[:help]
    invoke :help, ['check']
  else
    require_relative 'commands/check'
    S3sec::Commands::Check.new(options).execute
  end
end

#configObject



36
37
38
39
40
41
42
43
# File 'lib/s3sec/cli.rb', line 36

def config(*)
  if options[:help]
    invoke :help, ['config']
  else
    require_relative 'commands/config'
    S3sec::Commands::Config.new(options).execute
  end
end

#versionObject



15
16
17
18
# File 'lib/s3sec/cli.rb', line 15

def version
  require_relative 'version'
  puts "v#{S3sec::VERSION}"
end