Sha256: d201134d4fa9f340bc10f2d2a3f1be78f1db173cd546d3527f5ff3561b07e548

Contents?: true

Size: 591 Bytes

Versions: 5

Compression:

Stored size: 591 Bytes

Contents

require 'money_s3/builders/base_builder'
require 'money_s3/builders/faktura_type'

module MoneyS3
  module Builders
    class Data
      include BaseBuilder

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

        if data.key? :fakt_vyd
          root << FakturaType.new('FaktVyd', data[:fakt_vyd]).builder
        end

        if data.key? :fakt_prij
          root << FakturaType.new('FaktPrij', data[:fakt_prij]).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/data.rb
money_s3-0.9.0 lib/money_s3/builders/data.rb
money_s3-0.8.0 lib/money_s3/builders/data.rb
money_s3-0.7.0 lib/money_s3/builders/data.rb
money_s3-0.6.0 lib/money_s3/builders/data.rb