Class: Semverve::VersionFile::UpdateResult
- Inherits:
-
Object
- Object
- Semverve::VersionFile::UpdateResult
- Defined in:
- lib/semverve/version_file.rb
Overview
Result of attempting to update a version file.
Instance Attribute Summary collapse
-
#previous_version ⇒ Semverve::SemanticVersion
readonly
Version parsed before the update.
-
#version ⇒ Semverve::SemanticVersion
readonly
Version requested by the update.
Instance Method Summary collapse
-
#changed? ⇒ Boolean
Whether the version file was changed.
-
#initialize(previous_version:, version:, changed:) ⇒ Semverve::VersionFile::UpdateResult
constructor
Initializes an update result.
Constructor Details
#initialize(previous_version:, version:, changed:) ⇒ Semverve::VersionFile::UpdateResult
Initializes an update result.
33 34 35 36 37 |
# File 'lib/semverve/version_file.rb', line 33 def initialize(previous_version:, version:, changed:) @previous_version = previous_version @version = version @changed = changed end |
Instance Attribute Details
#previous_version ⇒ Semverve::SemanticVersion (readonly)
Version parsed before the update.
17 18 19 |
# File 'lib/semverve/version_file.rb', line 17 def previous_version @previous_version end |
#version ⇒ Semverve::SemanticVersion (readonly)
Version requested by the update.
23 24 25 |
# File 'lib/semverve/version_file.rb', line 23 def version @version end |
Instance Method Details
#changed? ⇒ Boolean
Whether the version file was changed.
43 44 45 |
# File 'lib/semverve/version_file.rb', line 43 def changed? @changed end |