Class: GemChanges::SummaryTable
- Inherits:
-
Object
- Object
- GemChanges::SummaryTable
- Defined in:
- lib/gem_changes/summary_table.rb
Defined Under Namespace
Classes: Row
Instance Attribute Summary collapse
-
#changes ⇒ Object
readonly
Returns the value of attribute changes.
Instance Method Summary collapse
-
#initialize(changes:) ⇒ SummaryTable
constructor
A new instance of SummaryTable.
- #markdown ⇒ Object
Constructor Details
#initialize(changes:) ⇒ SummaryTable
Returns a new instance of SummaryTable.
7 8 9 |
# File 'lib/gem_changes/summary_table.rb', line 7 def initialize(changes:) @changes = changes end |
Instance Attribute Details
#changes ⇒ Object (readonly)
Returns the value of attribute changes.
5 6 7 |
# File 'lib/gem_changes/summary_table.rb', line 5 def changes @changes end |
Instance Method Details
#markdown ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/gem_changes/summary_table.rb', line 11 def markdown string = "" string += "| Gem | Source | Changelog | Change | Version | Level |\n" string += "| :-: | :----: | :-------: | :----: | :-----: | :---: |\n" rows = changes.map { |change| Row.new(change:) } string += rows.map(&:markdown).join string end |