Class: Absa::Esd::Transmission::Record

Inherits:
Object
  • Object
show all
Extended by:
Strata::RecordWriter::ClassMethods
Includes:
Strata::RecordWriter
Defined in:
lib/absa-esd/transmission/record.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Record

Returns a new instance of Record.



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

def initialize(options = {})
  set_layout_variables(options)
  validate! options
end

Class Method Details

.class_layout_rulesObject



17
18
19
20
21
22
# File 'lib/absa-esd/transmission/record.rb', line 17

def self.class_layout_rules
  file_name = "#{Absa::Esd::CONFIG_DIR}/#{self.name.split("::")[-3].underscore}/#{self.name.split("::")[-2].underscore}.yml"
  record_type = self.name.split("::")[-1].underscore
      
  YAML.load(File.open(file_name))[record_type]
end