Class: CC::CLI::Engines::Disable
- Inherits:
-
EngineCommand
- Object
- Command
- EngineCommand
- CC::CLI::Engines::Disable
- Defined in:
- lib/cc/cli/engines/disable.rb
Constant Summary
Constants inherited from Command
Instance Method Summary collapse
Methods inherited from Command
command_name, #execute, #fatal, #initialize, #require_codeclimate_yml, #say, #warn
Constructor Details
This class inherits a constructor from CC::CLI::Command
Instance Method Details
#run ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/cc/cli/engines/disable.rb', line 7 def run require_codeclimate_yml if !engine_exists? say "Engine not found. Run 'codeclimate engines:list' for a list of valid engines." elsif !engine_present_in_yaml? say "Engine not found in .codeclimate.yml." elsif !engine_enabled? say "Engine already disabled." else disable_engine update_yaml say "Engine disabled." end end |