Module: Lutaml::Xml::Configurable

Defined in:
lib/lutaml/xml/configurable.rb

Overview

Unified XML configuration interface for Model and Type classes

This module provides a common interface for XML configuration that can be included in both Model classes (via Serializable) and Type classes (via Type::Value).

Examples:

Including in a class

class MyModel < Lutaml::Model::Serializable
  include Lutaml::Xml::Configurable

  xml do
    root 'MyModel'
    namespace MyNamespace
  end
end

In a Type class

class MyType < Lutaml::Model::Type::String
  include Lutaml::Xml::Configurable

  xml do
    namespace MyNamespace
    xsd_type 'my:CustomType'
  end
end

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object

Hook to extend including class with ClassMethods



33
34
35
# File 'lib/lutaml/xml/configurable.rb', line 33

def self.included(base)
  base.extend(ClassMethods)
end