Class: Lutaml::Xml::Schema::Xsd::NamespaceMapping

Inherits:
Model::Serializable show all
Defined in:
lib/lutaml/xml/schema/xsd/namespace_mapping.rb

Overview

Represents a namespace prefix to URI mapping

Constant Summary

Constants included from Model::Serialize

Model::Serialize::DEFAULT_VALUE_MAP, Model::Serialize::INTERNAL_ATTRIBUTES, Model::Serialize::LAZY_EMPTY_COLLECTION

Instance Attribute Summary

Attributes included from Model::Serialize

#lutaml_parent, #lutaml_register, #lutaml_root

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Model::Serialize

#attr_value, #attribute_exist?, #extract_register_id, included, #init_deserialization_state, #initialize, #key_exist?, #key_value, #method_missing, #prepare_instance_format_options, #pretty_print_instance_variables, register_format_mapping_method, register_from_format_method, register_to_format_method, #respond_to_missing?, #to_format, #to_yaml_hash, #using_default?, #using_default_for, #validate_attribute!, #validate_root_mapping!, #value_map, #value_set_for

Methods included from Model::Liquefiable

included, #to_liquid

Methods included from Model::Validation

#format_element_sequences, #order_names, #validate, #validate!, #validate_helper, #validate_sequence!

Methods included from Model::ComparableModel

#already_compared?, #attributes_hash, #calculate_hash, #comparison_key, #eql?, #hash, included, #same_class?

Methods included from Model::Serialize::Builder

#initialize, #mixed_content?

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Lutaml::Model::Serialize

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:



24
25
26
# File 'lib/lutaml/xml/schema/xsd/namespace_mapping.rb', line 24

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

Instance Method Details

#to_hashHash

Convert to hash format

Returns:

  • (Hash)


30
31
32
# File 'lib/lutaml/xml/schema/xsd/namespace_mapping.rb', line 30

def to_hash
  { prefix => uri }
end