Class: Dependabot::NpmAndYarn::UpdateChecker::LibraryDetector
- Inherits:
-
Object
- Object
- Dependabot::NpmAndYarn::UpdateChecker::LibraryDetector
- Defined in:
- lib/dependabot/npm_and_yarn/update_checker/library_detector.rb
Instance Method Summary collapse
-
#initialize(package_json_file:, credentials:, dependency_files:) ⇒ LibraryDetector
constructor
A new instance of LibraryDetector.
- #library? ⇒ Boolean
Constructor Details
#initialize(package_json_file:, credentials:, dependency_files:) ⇒ LibraryDetector
Returns a new instance of LibraryDetector.
12 13 14 15 16 |
# File 'lib/dependabot/npm_and_yarn/update_checker/library_detector.rb', line 12 def initialize(package_json_file:, credentials:, dependency_files:) @package_json_file = package_json_file @credentials = credentials @dependency_files = dependency_files end |
Instance Method Details
#library? ⇒ Boolean
18 19 20 21 22 |
# File 'lib/dependabot/npm_and_yarn/update_checker/library_detector.rb', line 18 def library? return false unless package_json_may_be_for_library? npm_response_matches_package_json? end |