class LeccaClient::CNAB::Loan::LoanFile
Constants
- FILE_PREFIX
Attributes
content[R]
filename[R]
filepath[R]
Public Class Methods
available_files()
click to toggle source
# File lib/lecca_client/cnab/loan/loan_file.rb, line 26 def self.available_files files = LeccaClient::Downloader.new.download_files(FILE_PREFIX) files.map { |file| new(file) } end
new(filename:, filepath:, content:)
click to toggle source
# File lib/lecca_client/cnab/loan/loan_file.rb, line 8 def initialize(filename:, filepath:, content:) @filename = filename @filepath = filepath @content = content end
retrieve_file(filename)
click to toggle source
# File lib/lecca_client/cnab/loan/loan_file.rb, line 22 def self.retrieve_file(filename) new(LeccaClient::Downloader.new.download_file(filename)) end
Public Instance Methods
parse()
click to toggle source
# File lib/lecca_client/cnab/loan/loan_file.rb, line 14 def parse @parsed ||= Parser.new(content).parse end
purge()
click to toggle source
# File lib/lecca_client/cnab/loan/loan_file.rb, line 18 def purge LeccaClient::FileHandler.new.remove(filepath) end