Sha256: f43718f08234c5e5b857219094718068b37982178273937a69e9ad8018d7a687

Contents?: true

Size: 1.16 KB

Versions: 5

Compression:

Stored size: 1.16 KB

Contents

require 'money_s3/builders/base_builder'

module MoneyS3
  module Builders
    class Eshop
      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('IN_Export', data[:in_export]) if data.key? :in_export
        root << build_element('IN_Changed', data[:in_changed]) if data.key? :in_changed
        root << build_element('IN_Id', data[:in_id]) if data.key? :in_id
        root << build_element('IN_Jmeno', data[:in_jmeno]) if data.key? :in_jmeno
        root << build_element('IN_Heslo', data[:in_heslo]) if data.key? :in_heslo
        root << build_element('IN_Dealer', data[:in_dealer]) if data.key? :in_dealer
        root << build_element('IN_DSkup', data[:in_d_skup]) if data.key? :in_d_skup
        root << build_element('IN_IndSlev', data[:in_ind_slev]) if data.key? :in_ind_slev
        root << build_element('IN_Soukrom', data[:in_soukrom]) if data.key? :in_soukrom
        root << build_element('IN_DSkupZkratka', data[:in_d_skup_zkratka]) if data.key? :in_d_skup_zkratka

        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/eshop.rb
money_s3-0.9.0 lib/money_s3/builders/eshop.rb
money_s3-0.8.0 lib/money_s3/builders/eshop.rb
money_s3-0.7.0 lib/money_s3/builders/eshop.rb
money_s3-0.6.0 lib/money_s3/builders/eshop.rb