Class: GitLab::Monitor::CLI::NullRunner

Inherits:
Object
  • Object
show all
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

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

#runObject



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