Class: Kirico::Form
- Inherits:
-
Object
- Object
- Kirico::Form
- Includes:
- ActiveModel::Validations
- Defined in:
- lib/kirico/models/form.rb
Constant Summary collapse
- FILE_NAME =
'SHFD0006.CSV'
Instance Method Summary collapse
-
#initialize(fd:, company:, records: []) ⇒ Form
constructor
A new instance of Form.
- #to_csv ⇒ Object
Constructor Details
#initialize(fd:, company:, records: []) ⇒ Form
Returns a new instance of Form.
19 20 21 22 23 |
# File 'lib/kirico/models/form.rb', line 19 def initialize(fd:, company:, records: []) @fd = fd @company = company @records = records end |
Instance Method Details
#to_csv ⇒ Object
25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/kirico/models/form.rb', line 25 def to_csv [ @fd.to_csv, Kirico::CompanyIdentifier.new.to_csv, Kirico::CompanyCount.new.to_csv, @company.to_csv, Kirico::DataIdentifier.new.to_csv, @records.map(&:to_csv).join("\r\n"), '' ].join("\r\n") end |