Class: RubocopTodoCorrector::CopSourceDetector
- Inherits:
-
Object
- Object
- RubocopTodoCorrector::CopSourceDetector
- Defined in:
- lib/rubocop_todo_corrector/cop_source_detector.rb
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ String?
-
#initialize(cop_name:, temporary_gemfile_path:) ⇒ CopSourceDetector
constructor
A new instance of CopSourceDetector.
Constructor Details
#initialize(cop_name:, temporary_gemfile_path:) ⇒ CopSourceDetector
Returns a new instance of CopSourceDetector.
22 23 24 25 26 27 28 |
# File 'lib/rubocop_todo_corrector/cop_source_detector.rb', line 22 def initialize( cop_name:, temporary_gemfile_path: ) @cop_name = cop_name @temporary_gemfile_path = temporary_gemfile_path end |
Class Method Details
.call(cop_name:, temporary_gemfile_path:) ⇒ String?
11 12 13 14 15 16 17 18 19 |
# File 'lib/rubocop_todo_corrector/cop_source_detector.rb', line 11 def call( cop_name:, temporary_gemfile_path: ) new( cop_name:, temporary_gemfile_path: ).call end |
Instance Method Details
#call ⇒ String?
31 32 33 34 |
# File 'lib/rubocop_todo_corrector/cop_source_detector.rb', line 31 def call output = capture output unless output.empty? end |