Sha256: d7931a0ba902d9ffb1b4f40d8e70762c9269e5415f53db20db7a74bc0137a30e

Contents?: true

Size: 560 Bytes

Versions: 1

Compression:

Stored size: 560 Bytes

Contents

require 'money_s3/builders/base_builder'

module MoneyS3
  module Builders
    class VysledekOdesl
      include BaseBuilder

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

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

        if attributes.key? :varovani
          attributes[:varovani].map { |i| Ox::Element.new('Varovani') << i }.each { |i| root << i }
        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/vysledek_odesl.rb