Sha256: e455d2068ae49a710714bc61cce247ebb3a8c6b0e23b1af7db24bdb86320951d

Contents?: true

Size: 602 Bytes

Versions: 12

Compression:

Stored size: 602 Bytes

Contents

# frozen_string_literal: true

module Lutaml
  module Model
    module XmlAdapter
      # Represents an XML attribute
      class XmlAttribute
        attr_reader :name, :value, :namespace, :namespace_prefix

        def initialize(name, value, namespace: nil, namespace_prefix: nil)
          @name = name
          @value = value
          @namespace = namespace
          @namespace_prefix = namespace_prefix
        end

        def unprefixed_name
          if namespace_prefix
            name.split(":").last
          else
            name
          end
        end
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
lutaml-model-0.3.13 lib/lutaml/model/xml_adapter/xml_attribute.rb
lutaml-model-0.3.12 lib/lutaml/model/xml_adapter/xml_attribute.rb
lutaml-model-0.3.11 lib/lutaml/model/xml_adapter/xml_attribute.rb
lutaml-model-0.3.10 lib/lutaml/model/xml_adapter/xml_attribute.rb
lutaml-model-0.3.9 lib/lutaml/model/xml_adapter/xml_attribute.rb
lutaml-model-0.3.8 lib/lutaml/model/xml_adapter/xml_attribute.rb
lutaml-model-0.3.7 lib/lutaml/model/xml_adapter/xml_attribute.rb
lutaml-model-0.3.6 lib/lutaml/model/xml_adapter/xml_attribute.rb
lutaml-model-0.3.5 lib/lutaml/model/xml_adapter/xml_attribute.rb
lutaml-model-0.3.4 lib/lutaml/model/xml_adapter/xml_attribute.rb
lutaml-model-0.3.3 lib/lutaml/model/xml_adapter/xml_attribute.rb
lutaml-model-0.3.2 lib/lutaml/model/xml_adapter/xml_attribute.rb