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
98 99 100 |
# File 'lib/rubocop_challenger/cli.rb', line 98 def self.exit_on_failure? true end |
Instance Method Details
#go ⇒ Object
82 83 84 85 86 87 88 89 |
# File 'lib/rubocop_challenger/cli.rb', line 82 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
92 93 94 |
# File 'lib/rubocop_challenger/cli.rb', line 92 def version puts RubocopChallenger::VERSION end |