Class: Lutaml::Xml::TransformationBuilder

Inherits:
Model::TransformationBuilder show all
Defined in:
lib/lutaml/xml/transformation_builder.rb

Overview

Builder for XML format transformations.

Creates Transformation instances for serializing models to XML.

Examples:

Usage

builder = TransformationBuilder
transformation = builder.build(Person, mapping, :xml, register)

Constant Summary collapse

FORMATS =

Formats handled by this builder

[:xml].freeze

Class Method Summary collapse

Methods inherited from Model::TransformationBuilder

handles?

Class Method Details

.build(model_class, mapping, format, register) ⇒ Transformation

Build an XML transformation instance.

Parameters:

  • model_class (Class)

    The model class

  • mapping (Mapping)

    The XML mapping

  • format (Symbol)

    The format (:xml)

  • register (Register, nil)

    The register for type resolution

Returns:



23
24
25
# File 'lib/lutaml/xml/transformation_builder.rb', line 23

def self.build(model_class, mapping, format, register)
  Transformation.new(model_class, mapping, format, register)
end