Class: Metanorma::IsoDocument::Sections::IsoForewordSection

Inherits:
Lutaml::Model::Serializable
  • Object
show all
Defined in:
lib/metanorma/iso_document/sections/iso_foreword_section.rb

Overview

Foreword section of an ISO/IEC document. Uses ‘ordered` to enable `each_mixed_content` for document-order iteration. Maps direct block children (no <blocks> wrapper).

Instance Method Summary collapse

Instance Method Details

#blocksObject

Blocks in document order, used by JSON serialization



92
93
94
95
96
97
98
99
100
101
# File 'lib/metanorma/iso_document/sections/iso_foreword_section.rb', line 92

def blocks
  @blocks ||=
    begin
      result = []
      each_mixed_content do |node|
        result << node unless node.is_a?(String)
      end
      result
    end
end