Sha256: a9682882060de5cde227a404aa21b7209e5b9c2741b30c7a78b137f39aacaeb0
Contents?: true
Size: 828 Bytes
Versions: 15
Compression:
Stored size: 828 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 def namespaced_name if unprefixed_name == "lang" name elsif namespace "#{namespace}:#{unprefixed_name}" else unprefixed_name end end end end end end
Version data entries
15 entries across 15 versions & 1 rubygems