Class: CodeownersValidator::MainCli
- Inherits:
-
Object
- Object
- CodeownersValidator::MainCli
- Defined in:
- lib/codeowners_validator/cli/main_cli.rb
Instance Method Summary collapse
-
#initialize(argv) ⇒ MainCli
constructor
A new instance of MainCli.
- #run ⇒ Object
Constructor Details
#initialize(argv) ⇒ MainCli
Returns a new instance of MainCli.
7 8 9 |
# File 'lib/codeowners_validator/cli/main_cli.rb', line 7 def initialize(argv) @argv = argv.dup end |
Instance Method Details
#run ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/codeowners_validator/cli/main_cli.rb', line 11 def run subcommand = @argv.shift case subcommand when "duplicate" then run_subcommand(DuplicateCli) when "ghost" then run_subcommand(GhostCli) when "uncovered" then run_subcommand(UncoveredCli) when "-h", "--help" puts usage 0 else warn usage 1 end end |