Class: RubocopTodoCorrector::GemVersionDetector
- Inherits:
-
Object
- Object
- RubocopTodoCorrector::GemVersionDetector
- Defined in:
- lib/rubocop_todo_corrector/gem_version_detector.rb
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ String?
-
#initialize(gemfile_lock_path:, gem_name:) ⇒ GemVersionDetector
constructor
A new instance of GemVersionDetector.
Constructor Details
#initialize(gemfile_lock_path:, gem_name:) ⇒ GemVersionDetector
Returns a new instance of GemVersionDetector.
19 20 21 22 |
# File 'lib/rubocop_todo_corrector/gem_version_detector.rb', line 19 def initialize(gemfile_lock_path:, gem_name:) @gemfile_lock_path = gemfile_lock_path @gem_name = gem_name end |
Class Method Details
.call(gemfile_lock_path:, gem_name:) ⇒ String?
11 12 13 14 15 16 |
# File 'lib/rubocop_todo_corrector/gem_version_detector.rb', line 11 def call(gemfile_lock_path:, gem_name:) new( gemfile_lock_path:, gem_name: ).call end |
Instance Method Details
#call ⇒ String?
25 26 27 |
# File 'lib/rubocop_todo_corrector/gem_version_detector.rb', line 25 def call specification&.version&.to_s end |