Skip to content

Commit

Permalink
cosmetic & ensure
Browse files Browse the repository at this point in the history
  • Loading branch information
mwarin committed Oct 19, 2023
1 parent a4a5861 commit c655ef8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/reports/shared_print_phase_count.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ class SharedPrintPhaseCount
attr_reader :phase, :finder, :output
def initialize(phase: SharedPrint::Phases.list.max)
@phase = phase.to_i
# Potentially use Reports::Dynamic instead of SharedPrint::Finder
# (but SP::Finder does the trick just fine for now)
@finder = SharedPrint::Finder.new(phase: [@phase])
@output = Utils::ReportOutput.new("sp_phase#{@phase}_count")
end
Expand All @@ -29,6 +31,7 @@ def run
handle.puts [org, phase, organization_tally[org]].join("\t")
end
puts "Finished writing to #{output.file}"
ensure
handle.close
end

Expand Down

0 comments on commit c655ef8

Please sign in to comment.