Sha256: 4a21fe661af4de45919f824c7ec60a556546d4bb0e0e8feef6abfe9180a017f9

Contents?: true

Size: 1.08 KB

Versions: 1

Compression:

Stored size: 1.08 KB

Contents

module MoneyS3
  module Builders
    class ZamestnanecType
      include ParserCore::BaseBuilder

      def builder
        root = Ox::Element.new(name)
        if data.key? :attributes
          data[:attributes].each { |k, v| root[k] = v }
        end

        root << build_element('OsCislo', data[:os_cislo], data[:os_cislo_attributes]) if data.key? :os_cislo
        root << build_element('Jmeno', data[:jmeno], data[:jmeno_attributes]) if data.key? :jmeno
        root << build_element('Stredisko', data[:stredisko], data[:stredisko_attributes]) if data.key? :stredisko
        root << build_element('DatNastup', data[:dat_nastup], data[:dat_nastup_attributes]) if data.key? :dat_nastup
        root << build_element('DatOdchod', data[:dat_odchod], data[:dat_odchod_attributes]) if data.key? :dat_odchod
        if data.key? :seznam_mzdovych_obdobi
          element = Ox::Element.new('SeznamMzdovychObdobi')
          data[:seznam_mzdovych_obdobi].each { |i| element << MzdoveObdobiType.new('MzdoveObdobi', i).builder }
          root << element
        end

        root
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
money_s3-1.0.0 lib/money_s3/builders/zamestnanec_type.rb