Sha256: 9ea59a49e9d3087ef52c42741e1f72aeb062273955a6a9d83d810172b77a5e93

Contents?: true

Size: 966 Bytes

Versions: 1

Compression:

Stored size: 966 Bytes

Contents

module MoneyS3
  module Builders
    class ParametrType
      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('ID', data[:id], data[:id_attributes]) if data.key? :id
        root << build_element('Nazev', data[:nazev], data[:nazev_attributes]) if data.key? :nazev
        root << build_element('Druh', data[:druh], data[:druh_attributes]) if data.key? :druh
        root << build_element('Typ', data[:typ], data[:typ_attributes]) if data.key? :typ
        root << build_element('MJ', data[:mj], data[:mj_attributes]) if data.key? :mj
        root << build_element('UzivCode', data[:uziv_code], data[:uziv_code_attributes]) if data.key? :uziv_code
        root << build_element('Hodnoty', data[:hodnoty], data[:hodnoty_attributes]) if data.key? :hodnoty

        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/parametr_type.rb