Class: GitLab::Exporter::CLI::NullRunner

Inherits:
Object
  • Object
show all
Defined in:
lib/gitlab_exporter/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.



38
# File 'lib/gitlab_exporter/cli.rb', line 38

def initialize(args); end

Instance Method Details

#runObject



40
41
42
43
# File 'lib/gitlab_exporter/cli.rb', line 40

def run
  fail InvalidCLICommand.new("Usage: #{EXECUTABLE_NAME} <command> [options] [arguments...]\n\n"\
                             "Available commands are: #{GitLab::Exporter::CLI.commands.keys.join(', ')}")
end