Class: SystemdServiceCheck::CLI

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

Overview

CLI

Defined Under Namespace

Classes: InvalidFormatOption

Instance Method Summary collapse

Instance Method Details

#check(*env) ⇒ Object



32
33
34
35
36
37
38
39
40
# File 'lib/systemd_service_check/cli.rb', line 32

def check(*env)
  raise InvalidFormatOption unless format_option_validate
  @ssc = Base.new(env, options[:yaml])
  disp
rescue InvalidFormatOption => e
  puts "<#{e}>",
       "  [#{options[:format]}] is invalid value."
  puts "  #{e.backtrace_locations.first}"
end

#versionObject



43
44
45
# File 'lib/systemd_service_check/cli.rb', line 43

def version
  puts VERSION
end