Class: RubocopChallenger::CLI
- Inherits:
-
Thor
- Object
- Thor
- RubocopChallenger::CLI
- Defined in:
- lib/rubocop_challenger/cli.rb
Overview
To define CLI commands
Class Method Summary collapse
-
.exit_on_failure? ⇒ Boolean
Workaround to return exit code 1 when an error occurs.
Instance Method Summary collapse
Class Method Details
.exit_on_failure? ⇒ Boolean
Workaround to return exit code 1 when an error occurs
93 94 95 |
# File 'lib/rubocop_challenger/cli.rb', line 93 def self.exit_on_failure? true end |
Instance Method Details
#go ⇒ Object
77 78 79 80 81 82 83 84 |
# File 'lib/rubocop_challenger/cli.rb', line 77 def go Go.new().exec rescue Errors::NoAutoCorrectableRule => e puts Rainbow(e.).yellow rescue StandardError => e puts Rainbow(e.).red exit_process! end |
#version ⇒ Object
87 88 89 |
# File 'lib/rubocop_challenger/cli.rb', line 87 def version puts RubocopChallenger::VERSION end |