Class: Unwrappr::Writers::ProjectLinks
- Inherits:
-
Object
- Object
- Unwrappr::Writers::ProjectLinks
- Defined in:
- lib/unwrappr/writers/project_links.rb
Overview
Add links to project documentation as obtained from Rubygems.org. Specifically, the changelog and sourcecode.
Implements the ‘annotation_writer` interface required by the LockFileAnnotator.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(gem_change, gem_change_info) ⇒ ProjectLinks
constructor
A new instance of ProjectLinks.
- #write ⇒ Object
Constructor Details
#initialize(gem_change, gem_change_info) ⇒ ProjectLinks
Returns a new instance of ProjectLinks.
15 16 17 18 |
# File 'lib/unwrappr/writers/project_links.rb', line 15 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
11 12 13 |
# File 'lib/unwrappr/writers/project_links.rb', line 11 def self.write(gem_change, gem_change_info) new(gem_change, gem_change_info).write end |
Instance Method Details
#write ⇒ Object
20 21 22 |
# File 'lib/unwrappr/writers/project_links.rb', line 20 def write "[_#{change_log}, #{source_code}, #{gem_diff}_]\n" end |