Class: GemChangelogDiff::Formatter
- Inherits:
-
Object
- Object
- GemChangelogDiff::Formatter
- Defined in:
- lib/gem_changelog_diff/formatter.rb
Constant Summary collapse
- BOLD =
"\e[1m"- CYAN =
"\e[36m"- GREEN =
"\e[32m"- YELLOW =
"\e[33m"- RED =
"\e[31m"- RESET =
"\e[0m"
Instance Method Summary collapse
- #format(gem_reports) ⇒ Object
-
#initialize(color: default_color?) ) ⇒ Formatter
constructor
A new instance of Formatter.
Constructor Details
#initialize(color: default_color?) ) ⇒ Formatter
Returns a new instance of Formatter.
14 15 16 |
# File 'lib/gem_changelog_diff/formatter.rb', line 14 def initialize(color: default_color?) @color = color end |
Instance Method Details
#format(gem_reports) ⇒ Object
18 19 20 21 |
# File 'lib/gem_changelog_diff/formatter.rb', line 18 def format(gem_reports) output = gem_reports.map { |report| format_gem(report) }.join("\n") output + summary(gem_reports) end |