Class: ReleaseNotes::Section
- Inherits:
-
Object
- Object
- ReleaseNotes::Section
- Defined in:
- action/lib/release_notes.rb
Overview
Renders fetched release notes as collapsed Markdown details blocks.
Instance Method Summary collapse
-
#initialize(details, fetcher) ⇒ Section
constructor
A new instance of Section.
- #markdown ⇒ Object
Constructor Details
#initialize(details, fetcher) ⇒ Section
Returns a new instance of Section.
194 195 196 197 |
# File 'action/lib/release_notes.rb', line 194 def initialize(details, fetcher) @details = Array(details) @fetcher = fetcher end |
Instance Method Details
#markdown ⇒ Object
199 200 201 202 |
# File 'action/lib/release_notes.rb', line 199 def markdown sections = @details.filter_map { |detail| Block.new(detail, @fetcher).markdown } sections.join("\n\n") unless sections.empty? end |