Class: BankOCR::ReportGenerator

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

Overview

Creates a text file with generated report

Instance Method Summary collapse

Constructor Details

#initialize(output_path, account_numbers) ⇒ ReportGenerator

Returns a new instance of ReportGenerator.



4
5
6
7
# File 'lib/report_generator.rb', line 4

def initialize(output_path, )
  @output_path     = output_path
  @account_numbers = 
end

Instance Method Details

#save!Object



9
10
11
12
13
14
15
16
17
# File 'lib/report_generator.rb', line 9

def save!
  file = File.open(@output_path, 'w+')

  @account_numbers.each do ||
    file.write "#{}#{error()}\n"
  end

  file.close
end