Class: GemVersionCheck::Formatter::PrettyPrint
- Inherits:
-
Object
- Object
- GemVersionCheck::Formatter::PrettyPrint
- Defined in:
- lib/gem_version_check/formatter/pretty_print.rb
Instance Method Summary collapse
- #format ⇒ Object
-
#initialize(report_result) ⇒ PrettyPrint
constructor
A new instance of PrettyPrint.
Constructor Details
#initialize(report_result) ⇒ PrettyPrint
6 7 8 |
# File 'lib/gem_version_check/formatter/pretty_print.rb', line 6 def initialize(report_result) @report_result = Array(report_result) end |
Instance Method Details
#format ⇒ Object
10 11 12 13 14 |
# File 'lib/gem_version_check/formatter/pretty_print.rb', line 10 def format @report_result.inject("") do |result, project| result << "#{project_title(project)}\n#{format_project(project)}" end end |