class LSVplus::TotalRecordFormatter

Constants

TYPE
VERSION

Attributes

file[R]

Public Class Methods

call(file) click to toggle source
# File lib/lsv_plus/total_record_formatter.rb, line 10
def self.call(file)
  new(file).call
end
new(file) click to toggle source
# File lib/lsv_plus/total_record_formatter.rb, line 14
def initialize(file)
  @file = file
end

Public Instance Methods

call() click to toggle source
# File lib/lsv_plus/total_record_formatter.rb, line 18
def call
  [TYPE, VERSION, creation_date, creator_identification, record_number, currency, total_amount].join('')
end
creation_date() click to toggle source
# File lib/lsv_plus/total_record_formatter.rb, line 22
def creation_date
  LSVplus::FormattingHelper.date file.creation_date
end
creator_identification() click to toggle source
# File lib/lsv_plus/total_record_formatter.rb, line 26
def creator_identification
  file.creator_identification
end
currency() click to toggle source
# File lib/lsv_plus/total_record_formatter.rb, line 34
def currency
  file.currency
end
record_number() click to toggle source
# File lib/lsv_plus/total_record_formatter.rb, line 30
def record_number
  LSVplus::FormattingHelper.index file.records.length
end
total_amount() click to toggle source
# File lib/lsv_plus/total_record_formatter.rb, line 38
def total_amount
  LSVplus::FormattingHelper.amount file.total
end