Class: Dependabot::FileUpdaters::Elixir::Hex::MixfileGitPinUpdater
- Inherits:
-
Object
- Object
- Dependabot::FileUpdaters::Elixir::Hex::MixfileGitPinUpdater
- Defined in:
- lib/dependabot/file_updaters/elixir/hex/mixfile_git_pin_updater.rb
Instance Method Summary collapse
-
#initialize(dependency_name:, mixfile_content:, previous_pin:, updated_pin:) ⇒ MixfileGitPinUpdater
constructor
A new instance of MixfileGitPinUpdater.
- #updated_content ⇒ Object
Constructor Details
#initialize(dependency_name:, mixfile_content:, previous_pin:, updated_pin:) ⇒ MixfileGitPinUpdater
Returns a new instance of MixfileGitPinUpdater.
11 12 13 14 15 16 17 |
# File 'lib/dependabot/file_updaters/elixir/hex/mixfile_git_pin_updater.rb', line 11 def initialize(dependency_name:, mixfile_content:, previous_pin:, updated_pin:) @dependency_name = dependency_name @mixfile_content = mixfile_content @previous_pin = previous_pin @updated_pin = updated_pin end |
Instance Method Details
#updated_content ⇒ Object
19 20 21 22 23 24 25 26 27 |
# File 'lib/dependabot/file_updaters/elixir/hex/mixfile_git_pin_updater.rb', line 19 def updated_content updated_content = update_pin(mixfile_content) if content_should_change? && mixfile_content == updated_content raise "Expected content to change!" end updated_content end |