Class: Render::MissingResolvedSection
- Inherits:
-
Object
- Object
- Render::MissingResolvedSection
- Defined in:
- action/lib/render/missing_resolved_section.rb
Overview
Renders missing Package.resolved files that were allowed to degrade.
Instance Method Summary collapse
- #comment_markdown ⇒ Object
-
#initialize(records) ⇒ MissingResolvedSection
constructor
A new instance of MissingResolvedSection.
- #summary_lines ⇒ Object
Constructor Details
#initialize(records) ⇒ MissingResolvedSection
Returns a new instance of MissingResolvedSection.
6 7 8 |
# File 'action/lib/render/missing_resolved_section.rb', line 6 def initialize(records) @records = Array(records) end |
Instance Method Details
#comment_markdown ⇒ Object
16 17 18 19 20 |
# File 'action/lib/render/missing_resolved_section.rb', line 16 def comment_markdown return nil if @records.empty? ["### Missing Package.resolved", "", *@records.map { |record| "- `#{record['source']}`: #{record['message']}" }, "", resolve_hint].join("\n") end |
#summary_lines ⇒ Object
10 11 12 13 14 |
# File 'action/lib/render/missing_resolved_section.rb', line 10 def summary_lines return [] if @records.empty? ["", "### Missing Package.resolved", "", *@records.map { |record| "- `#{record['source']}`: #{record['message']}" }, "", resolve_hint] end |