Class: Lutaml::Xml::DataModel::XmlRawFragment

Inherits:
Object
  • Object
show all
Defined in:
lib/lutaml/xml/data_model.rb

Overview

Represents a raw XML fragment that should be serialized as-is.

Used by raw_element mappings to embed complete XML elements (e.g., SVG, MathML) without parsing, wrapping, or escaping.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(content) ⇒ XmlRawFragment

Returns a new instance of XmlRawFragment.



271
272
273
# File 'lib/lutaml/xml/data_model.rb', line 271

def initialize(content)
  @content = content.to_s
end

Instance Attribute Details

#contentObject (readonly)

Returns the value of attribute content.



269
270
271
# File 'lib/lutaml/xml/data_model.rb', line 269

def content
  @content
end

Instance Method Details

#to_sObject



275
276
277
# File 'lib/lutaml/xml/data_model.rb', line 275

def to_s
  @content
end