Class: SubCommandBase
- Includes:
- InputConverters, OptionsParser, OutputConverters
- Defined in:
- lib/emasser/get.rb,
lib/emasser/put.rb,
lib/emasser/post.rb,
lib/emasser/delete.rb
Overview
Hack class that properly formats the CLI help
Direct Known Subclasses
Emasser::Artifacts, Emasser::CAC, Emasser::CMMC, Emasser::Controls, Emasser::Delete, Emasser::Get, Emasser::Milestones, Emasser::PAC, Emasser::Poams, Emasser::Post, Emasser::Put, Emasser::Roles, Emasser::ScanFindings, Emasser::System, Emasser::Systems, Emasser::Test, Emasser::TestResults, Emasser::WorkflowDefinitions, Emasser::WorkflowInstances
Class Method Summary collapse
-
.banner(command, _namespace = nil, subcommand = false) ⇒ Object
rubocop:disable Style/OptionalBooleanParameter.
Methods included from OutputConverters
Methods included from InputConverters
Methods included from OptionsParser
#optional_options, #required_options
Class Method Details
.banner(command, _namespace = nil, subcommand = false) ⇒ Object
rubocop:disable Style/OptionalBooleanParameter
14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/emasser/get.rb', line 14 def self.(command, _namespace = nil, subcommand = false) # Use the $thor_runner (declared by the Thor CLI framework) # to properly format the help text of sub-sub-commands. # rubocop:disable Style/GlobalVars if ancestors[0].to_s.include? '::Get' "#{basename} #{command.formatted_usage(self, $thor_runner, subcommand)}" else "#{basename} get #{command.formatted_usage(self, $thor_runner, subcommand)}" end # rubocop:enable Style/GlobalVars end |