Class: Absa::Esd::Transmission::Document

Inherits:
Set
  • Object
show all
Defined in:
lib/absa-esd/transmission/document.rb

Instance Attribute Summary

Attributes inherited from Set

#records

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Set

build, for_record, hash_from_s, #header, #initialize, is_trailer_record?, layout_rules, module_name, partial_class_name, process_record, record_type, record_types, #to_s, #trailer, trailer_id, #transactions, #validate!

Constructor Details

This class inherits a constructor from Absa::Esd::Transmission::Set

Class Method Details

.from_s(string) ⇒ Object



7
8
9
10
# File 'lib/absa-esd/transmission/document.rb', line 7

def self.from_s(string)
  options = self.hash_from_s(string)
  self.build(options[:data])
end

Instance Method Details

#from_file!(filename) ⇒ Object



12
13
14
# File 'lib/absa-esd/transmission/document.rb', line 12

def from_file!(filename)
  self.from_s(File.open(filename, "rb").read)
end