Class: RubocopDirector::Commands::GenerateConfig
- Inherits:
-
Object
- Object
- RubocopDirector::Commands::GenerateConfig
- Defined in:
- lib/rubocop_director/commands/generate_config.rb
Constant Summary collapse
- RUBOCOP_TODO =
".rubocop_todo.yml"
Instance Method Summary collapse
-
#initialize(director_config:) ⇒ GenerateConfig
constructor
A new instance of GenerateConfig.
- #run {|check_config_already_exists| ... } ⇒ Object
Constructor Details
#initialize(director_config:) ⇒ GenerateConfig
Returns a new instance of GenerateConfig.
11 12 13 14 |
# File 'lib/rubocop_director/commands/generate_config.rb', line 11 def initialize(director_config:) @director_config_path = director_config @todo_config_path = TODO_CONFIG_NAME end |
Instance Method Details
#run {|check_config_already_exists| ... } ⇒ Object
16 17 18 19 20 21 |
# File 'lib/rubocop_director/commands/generate_config.rb', line 16 def run rubocop_todo = yield load_config yield check_config_already_exists create_config(rubocop_todo) end |