Sha256: 64e7bdb0ebb19ba528948b96a3c01c159c81b22b609001e40e8fc3916f21bf5e

Contents?: true

Size: 919 Bytes

Versions: 9

Compression:

Stored size: 919 Bytes

Contents

require_relative "mapping_rule"

module Lutaml
  module Model
    class XmlMappingRule < MappingRule
      attr_reader :namespace, :prefix

      def initialize(
        name,
        to:,
        render_nil: false,
        with: {},
        delegate: nil,
        namespace: nil,
        prefix: nil,
        mixed_content: false,
        namespace_set: false
      )
        super(
          name,
          to: to,
          render_nil: render_nil,
          with: with,
          delegate: delegate,
          mixed_content: mixed_content,
          namespace_set: namespace_set,
        )

        @namespace = if namespace.to_s == "inherit"
                     # we are using inherit_namespace in xml builder by
                     # default so no need to do anything here.
                     else
                       namespace
                     end
        @prefix = prefix
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
lutaml-model-0.3.10 lib/lutaml/model/xml_mapping_rule.rb
lutaml-model-0.3.9 lib/lutaml/model/xml_mapping_rule.rb
lutaml-model-0.3.8 lib/lutaml/model/xml_mapping_rule.rb
lutaml-model-0.3.7 lib/lutaml/model/xml_mapping_rule.rb
lutaml-model-0.3.6 lib/lutaml/model/xml_mapping_rule.rb
lutaml-model-0.3.5 lib/lutaml/model/xml_mapping_rule.rb
lutaml-model-0.3.4 lib/lutaml/model/xml_mapping_rule.rb
lutaml-model-0.3.3 lib/lutaml/model/xml_mapping_rule.rb
lutaml-model-0.3.2 lib/lutaml/model/xml_mapping_rule.rb