Module: Metanorma::StandardDocument::RootAttributes

Overview

Mixin that declares the common attributes for every <metanorma> Root class.

Every flavor Root class includes this module and adds its own flavor-specific attributes (e.g. bibdata type, preface/sections types).

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object



10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# File 'lib/metanorma/standard_document/root_attributes.rb', line 10

def self.included(base)
  base.class_eval do
    attribute :version,             :string
    attribute :type,                :string
    attribute :schema_version,      :string
    attribute :flavor,              :string

    attribute :bibliography,
              Metanorma::StandardDocument::Sections::BibliographySection
    attribute :boilerplate,
              Metanorma::StandardDocument::Boilerplate
    attribute :metanorma_extension,
              Metanorma::StandardDocument::Metadata::MetanormaExtension
    attribute :annotation_container,
              Metanorma::StandardDocument::AnnotationContainer
    attribute :localized_strings,
              Metanorma::Document::Components::Inline::LocalizedStringsElement
    attribute :fmt_footnote_container,
              Metanorma::Document::Components::Inline::FmtFootnoteContainerElement
    attribute :colophon,
              Metanorma::StandardDocument::Sections::Colophon

    attribute :term_sources,
              Metanorma::Document::Components::ReferenceElements::Citation,
              collection: true
    attribute :indexsect,
              Metanorma::Document::Components::Sections::BasicSection

    attribute :autonum,             :string
    attribute :fmt_xref_label,      :string
  end
end