Class: Metanorma::Document::Relaton::FormattedAddress
- Inherits:
-
Lutaml::Model::Serializable
- Object
- Lutaml::Model::Serializable
- Metanorma::Document::Relaton::FormattedAddress
- Defined in:
- lib/metanorma/document/relaton/address.rb
Overview
Model for formattedAddress element which may contain mixed content with <br/> tags.
Class Method Summary collapse
-
.from_lines(lines) ⇒ Object
Construct a FormattedAddress from an array of text lines, inserting <br/> elements between them for proper mixed-content serialization.
Class Method Details
.from_lines(lines) ⇒ Object
Construct a FormattedAddress from an array of text lines, inserting <br/> elements between them for proper mixed-content serialization.
22 23 24 25 26 27 28 29 |
# File 'lib/metanorma/document/relaton/address.rb', line 22 def self.from_lines(lines) new.tap do |fa| fa.content = lines fa.br = lines[1..].map do Metanorma::Document::Components::Inline::BrElement.new end end end |