Sha256: 3af13580f9318ced37d632d508221322bfd27da749e875b548540c81690b9254

Contents?: true

Size: 953 Bytes

Versions: 1

Compression:

Stored size: 953 Bytes

Contents

require 'money_s3/builders/base_builder'

module MoneyS3
  module Builders
    class PracPomer
      include BaseBuilder

      def builder
        root = Ox::Element.new(element_name)

        if attributes.key? :zkrat
          element = Ox::Element.new('Zkrat')
          element << attributes[:zkrat] if attributes[:zkrat]
          root << element
        end

        if attributes.key? :popis
          element = Ox::Element.new('Popis')
          element << attributes[:popis] if attributes[:popis]
          root << element
        end

        if attributes.key? :eldp_kod
          element = Ox::Element.new('ELDPKod')
          element << attributes[:eldp_kod] if attributes[:eldp_kod]
          root << element
        end

        if attributes.key? :pozn
          element = Ox::Element.new('Pozn')
          element << attributes[:pozn] if attributes[:pozn]
          root << element
        end

        root
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
money_s3-0.5.0 lib/money_s3/builders/prac_pomer.rb