Class: FileGenerator::Base
- Inherits:
-
Object
- Object
- FileGenerator::Base
- Defined in:
- lib/file_generator/base.rb
Class Method Summary collapse
Class Method Details
.generate_file(records, headerformat, bodyformat, footerformat) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/file_generator/base.rb', line 8 def generate_file(records, headerformat, bodyformat, ) file = [] fh = process_hf(headerformat, records) file << fh records.each do |record| fb = process_body(bodyformat, record) file << fb end ff = process_hf(, records) file << ff file = file.join("\n") file end |
.initialize ⇒ Object
5 6 |
# File 'lib/file_generator/base.rb', line 5 def initialize() end |