Class: Dependabot::NpmAndYarn::FileUpdater::PackageJsonUpdater
- Inherits:
-
Object
- Object
- Dependabot::NpmAndYarn::FileUpdater::PackageJsonUpdater
- Extended by:
- T::Sig
- Defined in:
- lib/dependabot/npm_and_yarn/file_updater/package_json_updater.rb
Instance Method Summary collapse
-
#initialize(package_json:, dependencies:) ⇒ PackageJsonUpdater
constructor
A new instance of PackageJsonUpdater.
- #updated_package_json ⇒ Object
Constructor Details
#initialize(package_json:, dependencies:) ⇒ PackageJsonUpdater
Returns a new instance of PackageJsonUpdater.
20 21 22 23 |
# File 'lib/dependabot/npm_and_yarn/file_updater/package_json_updater.rb', line 20 def initialize(package_json:, dependencies:) @package_json = package_json @dependencies = dependencies end |
Instance Method Details
#updated_package_json ⇒ Object
26 27 28 29 30 |
# File 'lib/dependabot/npm_and_yarn/file_updater/package_json_updater.rb', line 26 def updated_package_json updated_file = package_json.dup updated_file.content = updated_package_json_content updated_file end |