Class: MoneyS3::Builders::ObdobiDPH2

Inherits:
Object
  • Object
show all
Includes:
ParserCore::BaseBuilder
Defined in:
lib/money_s3/builders/obdobi_dph2.rb

Instance Method Summary collapse

Instance Method Details

#builderObject



6
7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/money_s3/builders/obdobi_dph2.rb', line 6

def builder
  root = Ox::Element.new(name)
  root = add_attributes_and_namespaces(root)

  root << build_element('DatumOd', data[:datum_od], data[:datum_od_attributes]) if data.key? :datum_od
  root << build_element('PohD_1', data[:poh_d_1], data[:poh_d_1_attributes]) if data.key? :poh_d_1
  root << build_element('PohD_2', data[:poh_d_2], data[:poh_d_2_attributes]) if data.key? :poh_d_2
  root << build_element('PohD_3', data[:poh_d_3], data[:poh_d_3_attributes]) if data.key? :poh_d_3
  root << build_element('PohD_4', data[:poh_d_4], data[:poh_d_4_attributes]) if data.key? :poh_d_4
  root << build_element('PohD_5', data[:poh_d_5], data[:poh_d_5_attributes]) if data.key? :poh_d_5
  root << build_element('PohD_6', data[:poh_d_6], data[:poh_d_6_attributes]) if data.key? :poh_d_6

  root
end