Class: GemVersionCheck::Report

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

Instance Method Summary collapse

Constructor Details

#initialize(project_names, options = {}) ⇒ Report

Returns a new instance of Report.



4
5
6
7
8
# File 'lib/gem_version_check/report.rb', line 4

def initialize(project_names, options = {})
  @project_names = project_names
  @options       = options
  @only          = options[:only] || []
end

Instance Method Details

#check_failed?Boolean

Returns:

  • (Boolean)


20
21
22
# File 'lib/gem_version_check/report.rb', line 20

def check_failed?
  @check_failed
end

#generateObject



10
11
12
13
14
15
16
17
18
# File 'lib/gem_version_check/report.rb', line 10

def generate
  @check_failed = false
  @project_names.inject([]) do |result, project_name|
    project = Project.new(project_name, @only)
    project.report
    @check_failed = true if project.check_failed?
    result << project
  end
end