Class: GitLab::Monitor::CLI::NullRunner
- Inherits:
-
Object
- Object
- GitLab::Monitor::CLI::NullRunner
- Defined in:
- lib/gitlab_monitor/cli.rb
Overview
Empty runner that will raise an InvalidCLICommand when executed to provide the usage in the exception message
Instance Method Summary collapse
-
#initialize(args) ⇒ NullRunner
constructor
A new instance of NullRunner.
- #run ⇒ Object
Constructor Details
#initialize(args) ⇒ NullRunner
Returns a new instance of NullRunner.
22 23 |
# File 'lib/gitlab_monitor/cli.rb', line 22 def initialize(args) end |
Instance Method Details
#run ⇒ Object
25 26 27 28 |
# File 'lib/gitlab_monitor/cli.rb', line 25 def run fail InvalidCLICommand.new("Usage: #{EXECUTABLE_NAME} <command> [options] [arguments...]\n\n"\ "Available commands are: #{GitLab::Monitor::CLI.commands.keys.join(', ')}") end |