Class: Overcommit::CLI
- Inherits:
-
Object
- Object
- Overcommit::CLI
- Defined in:
- lib/overcommit/cli.rb
Overview
Responsible for parsing command-line options and executing appropriate application logic based on those options.
Instance Method Summary collapse
-
#initialize(arguments, logger) ⇒ CLI
constructor
A new instance of CLI.
- #run ⇒ Object
Constructor Details
#initialize(arguments, logger) ⇒ CLI
Returns a new instance of CLI.
7 8 9 10 11 |
# File 'lib/overcommit/cli.rb', line 7 def initialize(arguments, logger) @arguments = arguments @log = logger @options = {} end |
Instance Method Details
#run ⇒ Object
13 14 15 16 17 18 19 20 21 22 |
# File 'lib/overcommit/cli.rb', line 13 def run parse_arguments case @options[:action] when :install, :uninstall install_or_uninstall when :template_dir print_template_directory_path end end |