Sha256: ec13a08820015410b10613e23dcd606849b929986d8d559abb79db8ce115ad33

Contents?: true

Size: 1.12 KB

Versions: 1

Compression:

Stored size: 1.12 KB

Contents

module MoneyS3
  module Builders
    class VlajkaType
      include ParserCore::BaseBuilder

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

        root << build_element('IDUser', data[:id_user], data[:id_user_attributes]) if data.key? :id_user
        root << build_element('NameUser', data[:name_user], data[:name_user_attributes]) if data.key? :name_user
        root << build_element('IDFlag', data[:id_flag], data[:id_flag_attributes]) if data.key? :id_flag
        root << build_element('Title', data[:title], data[:title_attributes]) if data.key? :title
        root << build_element('Enabled', data[:enabled], data[:enabled_attributes]) if data.key? :enabled
        root << build_element('Remark', data[:remark], data[:remark_attributes]) if data.key? :remark
        root << build_element('RFWidth', data[:rf_width], data[:rf_width_attributes]) if data.key? :rf_width
        root << build_element('RFHeight', data[:rf_height], data[:rf_height_attributes]) if data.key? :rf_height

        root
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
money_s3-1.0.0 lib/money_s3/builders/vlajka_type.rb