Sha256: 4d47143546768e5767278d139a5af9b7b330c1bc30e7d0361a9e58b110229faf

Contents?: true

Size: 1.03 KB

Versions: 6

Compression:

Stored size: 1.03 KB

Contents

module MoneyS3
  module Builders
    class ZamestnanecType
      include ParserCore::BaseBuilder

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

        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

6 entries across 6 versions & 1 rubygems

Version Path
money_s3-2.4.1 lib/money_s3/builders/zamestnanec_type.rb
money_s3-2.4.0 lib/money_s3/builders/zamestnanec_type.rb
money_s3-2.3.0 lib/money_s3/builders/zamestnanec_type.rb
money_s3-2.2.0 lib/money_s3/builders/zamestnanec_type.rb
money_s3-2.1.0 lib/money_s3/builders/zamestnanec_type.rb
money_s3-2.0.0 lib/money_s3/builders/zamestnanec_type.rb