Class: MoneyS3::Builders::DodavkaType

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

Instance Method Summary collapse

Instance Method Details

#builderObject



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

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

  root << build_element('Oznaceni', data[:oznaceni], data[:oznaceni_attributes]) if data.key? :oznaceni
  root << build_element('DatExp', data[:dat_exp], data[:dat_exp_attributes]) if data.key? :dat_exp
  root << build_element('PocetMJ', data[:pocet_mj], data[:pocet_mj_attributes]) if data.key? :pocet_mj
  root << build_element('Cena', data[:cena], data[:cena_attributes]) if data.key? :cena

  root
end