Class: Metanorma::StandardDocument::Sections::ClauseSection

Inherits:
Lutaml::Model::Serializable
  • Object
show all
Includes:
BlockAttributes
Defined in:
lib/metanorma/standard_document/sections/clause_section.rb

Overview

A numbered clause in the document body. Corresponds to isodoc.rnc ‘Clause-Section`:

Section-Attributes, type?, title?,
( (BasicBlock+ | amend) |
  (clause-subsection | terms | definitions | floating-title)+ )

Uses ‘ordered` to enable `each_mixed_content` for document-order iteration.

Instance Method Summary collapse

Methods included from BlockAttributes

included

Instance Method Details

#blocksObject

Blocks in document order, used by JSON serialization



108
109
110
111
112
113
114
115
116
117
# File 'lib/metanorma/standard_document/sections/clause_section.rb', line 108

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