Class: Unwrappr::Writers::VersionChange

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/unwrappr/writers/version_change.rb

Overview

Describe the version change. Is it an upgrade to a later version, or a downgrade to an older version? Is it a major, minor or patch version change?

Implements the ‘annotation_writer` interface required by the LockFileAnnotator.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(gem_change, gem_change_info) ⇒ VersionChange

Returns a new instance of VersionChange.



18
19
20
21
# File 'lib/unwrappr/writers/version_change.rb', line 18

def initialize(gem_change, gem_change_info)
  @gem_change = gem_change
  @gem_change_info = gem_change_info
end

Class Method Details

.write(gem_change, gem_change_info) ⇒ Object



14
15
16
# File 'lib/unwrappr/writers/version_change.rb', line 14

def self.write(gem_change, gem_change_info)
  new(gem_change, gem_change_info).write
end

Instance Method Details

#writeObject



23
24
25
# File 'lib/unwrappr/writers/version_change.rb', line 23

def write
  "#{change_description}\n"
end