Sha256: d65e8c7a650dae8797bb5b59e3cff9b04437c3f4cb37f7fd2f7ed7be97d79dbe

Contents?: true

Size: 943 Bytes

Versions: 1

Compression:

Stored size: 943 Bytes

Contents

require 'money_s3/builders/base_builder'

module MoneyS3
  module Builders
    class Ucet
      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? :ucet
          element = Ox::Element.new('Ucet')
          element << attributes[:ucet] if attributes[:ucet]
          root << element
        end

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

        if attributes.key? :b_nazev
          element = Ox::Element.new('BNazev')
          element << attributes[:b_nazev] if attributes[:b_nazev]
          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/ucet.rb