Class: GemVersionCheck::Formatter::PrettyPrint

Inherits:
Object
  • Object
show all
Defined in:
lib/gem_version_check/formatter/pretty_print.rb

Instance Method Summary collapse

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

#formatObject



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