Class: Cease::Report

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

Constant Summary collapse

SUCCESS_EXIT_CODE =
0
ERROR_EXIT_CODE =
1

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(sources:) ⇒ Report

Returns a new instance of Report.



8
9
10
11
12
# File 'lib/cease/report.rb', line 8

def initialize(sources:)
  @sources = sources
  @examiners = []
  @total_eviction_count = 0
end

Instance Attribute Details

#total_eviction_countObject

Returns the value of attribute total_eviction_count.



27
28
29
# File 'lib/cease/report.rb', line 27

def total_eviction_count
  @total_eviction_count
end

Instance Method Details

#executeObject



14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/cease/report.rb', line 14

def execute
  print_header

  sources.each do |source|
    add_examiner(Examiner.new(source: source))
  end

  print_results
  print_footer if reportable?

  result_code
end