Class: Lutaml::Xsd::NamespaceMapping

Inherits:
Model::Serializable
  • Object
show all
Defined in:
lib/lutaml/xsd/namespace_mapping.rb

Overview

Represents a namespace prefix to URI mapping

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.from_pair(prefix, uri) ⇒ NamespaceMapping

Create from a hash entry

Parameters:

  • prefix (String)

    The namespace prefix

  • uri (String)

    The namespace URI

Returns:



22
23
24
# File 'lib/lutaml/xsd/namespace_mapping.rb', line 22

def self.from_pair(prefix, uri)
  new(prefix: prefix, uri: uri)
end

Instance Method Details

#to_hashHash

Convert to hash format

Returns:

  • (Hash)


28
29
30
# File 'lib/lutaml/xsd/namespace_mapping.rb', line 28

def to_hash
  { prefix => uri }
end