Sha256: 629e49c5d5931dfe1f8b4bf7e969a55bdcfa2df5781b0544a0a8c726cbd7f4a7

Contents?: true

Size: 1006 Bytes

Versions: 11

Compression:

Stored size: 1006 Bytes

Contents

require "isodoc"

module IsoDoc
  module M3AAWG
    class Metadata < IsoDoc::Generic::Metadata
      def configuration
        Metanorma::M3AAWG.configuration
      end

      def initialize(lang, script, locale, labels)
        super
        here = File.dirname(__FILE__)
        set(:logo_html,
            File.expand_path(File.join(here, "html", "m3-logo.png")))
        set(:logo_word,
            File.expand_path(File.join(here, "html", "logo.jpg")))
      end

      def title(isoxml, _out)
        main = isoxml&.at(ns("//bibdata/title[@language='en']"))&.text
        set(:doctitle, main)
      end

      def subtitle(_isoxml, _out)
        nil
      end

      def author(isoxml, _out)
        set(:tc, nil)
        tc = isoxml.at(ns("//bibdata/ext/editorialgroup/committee"))
        set(:tc, tc.text) if tc
        super
      end

      def docid(isoxml, _out)
        docnumber = isoxml.at(ns("//bibdata/docidentifier"))
        set(:docnumber, docnumber&.text)
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
metanorma-m3aawg-2.2.5 lib/isodoc/m3aawg/metadata.rb
metanorma-m3aawg-2.2.4 lib/isodoc/m3aawg/metadata.rb
metanorma-m3aawg-2.2.3 lib/isodoc/m3aawg/metadata.rb
metanorma-m3aawg-2.2.2 lib/isodoc/m3aawg/metadata.rb
metanorma-m3aawg-2.2.1 lib/isodoc/m3aawg/metadata.rb
metanorma-m3aawg-2.2.0 lib/isodoc/m3aawg/metadata.rb
metanorma-m3aawg-2.1.13 lib/isodoc/m3aawg/metadata.rb
metanorma-m3aawg-2.1.12 lib/isodoc/m3aawg/metadata.rb
metanorma-m3aawg-2.1.11 lib/isodoc/m3aawg/metadata.rb
metanorma-m3aawg-2.1.10 lib/isodoc/m3aawg/metadata.rb
metanorma-m3aawg-2.1.9 lib/isodoc/m3aawg/metadata.rb