Class: SystemdServiceCheck::CLI
- Inherits:
-
Thor
- Object
- Thor
- SystemdServiceCheck::CLI
- Defined in:
- lib/systemd_service_check/cli.rb
Overview
CLI
Defined Under Namespace
Classes: InvalidFormatOptionError
Instance Method Summary collapse
-
#check(*envs) ⇒ Object
rubocop:disable Metrics/AbcSize:.
- #version ⇒ Object
Instance Method Details
#check(*envs) ⇒ Object
rubocop:disable Metrics/AbcSize:
35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/systemd_service_check/cli.rb', line 35 def check(*envs) # rubocop:disable Metrics/AbcSize: raise InvalidFormatOptionError unless format_option_validate @ssc = Base.new(envs, [:yaml], [:role]) @ssc.run disp rescue InvalidFormatOptionError => e puts "<#{e}>", " [#{[:format]}] is invalid value." puts " #{e.backtrace_locations.first}" end |
#version ⇒ Object
49 50 51 |
# File 'lib/systemd_service_check/cli.rb', line 49 def version puts VERSION end |