Class: RubocopDirector::RubocopStats
- Inherits:
-
Object
- Object
- RubocopDirector::RubocopStats
- Defined in:
- lib/rubocop_director/rubocop_stats.rb
Constant Summary collapse
- TEMP_CONFIG_PATH =
"./.temp_rubocop.yml"
Instance Method Summary collapse
- #fetch {|generate_temp_rubocop_config_without_todo(initial_config: config)| ... } ⇒ Object
-
#initialize(rubocop_path) ⇒ RubocopStats
constructor
A new instance of RubocopStats.
Constructor Details
#initialize(rubocop_path) ⇒ RubocopStats
Returns a new instance of RubocopStats.
14 15 16 |
# File 'lib/rubocop_director/rubocop_stats.rb', line 14 def initialize(rubocop_path) @rubocop_path = rubocop_path end |
Instance Method Details
#fetch {|generate_temp_rubocop_config_without_todo(initial_config: config)| ... } ⇒ Object
18 19 20 21 22 23 24 25 26 |
# File 'lib/rubocop_director/rubocop_stats.rb', line 18 def fetch config = yield load_config yield generate_temp_rubocop_config_without_todo(initial_config: config) stats = yield generate_stats yield remove_temp_config Success(stats) end |