Class: Dependabot::Hex::FileUpdater::MixfileRequirementUpdater
- Inherits:
-
Object
- Object
- Dependabot::Hex::FileUpdater::MixfileRequirementUpdater
- Defined in:
- lib/dependabot/hex/file_updater/mixfile_requirement_updater.rb
Instance Method Summary collapse
-
#initialize(dependency_name:, mixfile_content:, previous_requirement:, updated_requirement:, insert_if_bare: false) ⇒ MixfileRequirementUpdater
constructor
A new instance of MixfileRequirementUpdater.
- #updated_content ⇒ Object
Constructor Details
#initialize(dependency_name:, mixfile_content:, previous_requirement:, updated_requirement:, insert_if_bare: false) ⇒ MixfileRequirementUpdater
Returns a new instance of MixfileRequirementUpdater.
11 12 13 14 15 16 17 18 19 |
# File 'lib/dependabot/hex/file_updater/mixfile_requirement_updater.rb', line 11 def initialize(dependency_name:, mixfile_content:, previous_requirement:, updated_requirement:, insert_if_bare: false) @dependency_name = dependency_name @mixfile_content = mixfile_content @previous_requirement = previous_requirement @updated_requirement = updated_requirement @insert_if_bare = end |
Instance Method Details
#updated_content ⇒ Object
21 22 23 24 25 26 27 |
# File 'lib/dependabot/hex/file_updater/mixfile_requirement_updater.rb', line 21 def updated_content updated_content = update_requirement(mixfile_content) raise "Expected content to change!" if content_should_change? && mixfile_content == updated_content updated_content end |