Class: Dependabot::Bundler::FileParser::GemspecDeclarationFinder
- Inherits:
-
Object
- Object
- Dependabot::Bundler::FileParser::GemspecDeclarationFinder
- Defined in:
- lib/dependabot/bundler/file_parser/gemspec_declaration_finder.rb
Overview
Checks whether a dependency is declared in a gemspec file
Instance Method Summary collapse
- #gemspec_includes_dependency?(dependency) ⇒ Boolean
-
#initialize(gemspec:) ⇒ GemspecDeclarationFinder
constructor
A new instance of GemspecDeclarationFinder.
Constructor Details
#initialize(gemspec:) ⇒ GemspecDeclarationFinder
Returns a new instance of GemspecDeclarationFinder.
10 11 12 13 |
# File 'lib/dependabot/bundler/file_parser/gemspec_declaration_finder.rb', line 10 def initialize(gemspec:) @gemspec = gemspec @declaration_nodes = {} end |
Instance Method Details
#gemspec_includes_dependency?(dependency) ⇒ Boolean
15 16 17 |
# File 'lib/dependabot/bundler/file_parser/gemspec_declaration_finder.rb', line 15 def gemspec_includes_dependency?(dependency) !declaration_node(dependency).nil? end |