Sha256: 63964227edd7e238a33a7751e66e81da23b782bd0acc5b26a58888ab875e0a50

Contents?: true

Size: 539 Bytes

Versions: 5

Compression:

Stored size: 539 Bytes

Contents

require 'money_s3/builders/base_builder'
require 'money_s3/builders/mena_type'

module MoneyS3
  module Builders
    class ValutyUhr
      include BaseBuilder

      def builder
        root = Ox::Element.new(name)
        if data.respond_to? :attributes
          data.attributes.each { |k, v| root[k] = v }
        end

        root << build_element('Castka', data[:castka]) if data.key? :castka

        if data.key? :mena
          root << MenaType.new('Mena', data[:mena]).builder
        end

        root
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
money_s3-0.10.0 lib/money_s3/builders/valuty_uhr.rb
money_s3-0.9.0 lib/money_s3/builders/valuty_uhr.rb
money_s3-0.8.0 lib/money_s3/builders/valuty_uhr.rb
money_s3-0.7.0 lib/money_s3/builders/valuty_uhr.rb
money_s3-0.6.0 lib/money_s3/builders/valuty_uhr.rb