Class: Metanorma::Document::Relaton::FormattedAddress

Inherits:
Lutaml::Model::Serializable
  • Object
show all
Defined in:
lib/metanorma/document/relaton/formatted_address.rb

Overview

A pre-formatted postal address with explicit line breaks. Keep-forever (wave-5 sweep): structured content + br elements — relaton-bib 2.2.0.pre.alpha.1 types formattedAddress as a raw string; not a migration candidate.

Class Method Summary collapse

Class Method Details

.from_lines(lines) ⇒ Object



22
23
24
25
26
27
28
29
# File 'lib/metanorma/document/relaton/formatted_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