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
9
# File 'lib/gem_version_check/report.rb', line 4

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

Instance Method Details

#check_failed?Boolean

Returns:

  • (Boolean)


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

def check_failed?
  @check_failed
end

#generateObject



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

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