Sha256: b4b273bff277178981d9e2bdf5433fdc697133445d5affec3ab9cd1d8af6c1df

Contents?: true

Size: 448 Bytes

Versions: 5

Compression:

Stored size: 448 Bytes

Contents

require 'money_s3/builders/base_builder'

module MoneyS3
  module Builders
    class ReferenceType
      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? :id
          data[:id].map { |i| Ox::Element.new('ID') << i }.each { |i| root << i }
        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/reference_type.rb
money_s3-0.9.0 lib/money_s3/builders/reference_type.rb
money_s3-0.8.0 lib/money_s3/builders/reference_type.rb
money_s3-0.7.0 lib/money_s3/builders/reference_type.rb
money_s3-0.6.0 lib/money_s3/builders/reference_type.rb