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.



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

def initialize(args); end

Instance Method Details

#runObject



24
25
26
27
# File 'lib/gitlab_exporter/cli.rb', line 24

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