Sha256: 31d46ddefe05e9e84233445020c3827b0cff2bf2a0a8737772bd0303f90e5fa9

Contents?: true

Size: 765 Bytes

Versions: 1

Compression:

Stored size: 765 Bytes

Contents

require 'money_s3/builders/base_builder'

module MoneyS3
  module Builders
    class MenaType
      include BaseBuilder

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

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

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

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