Class: IsoDoc::M3AAWG::Metadata
- Inherits:
-
Generic::Metadata
- Object
- Generic::Metadata
- IsoDoc::M3AAWG::Metadata
- Defined in:
- lib/isodoc/m3aawg/metadata.rb
Instance Method Summary collapse
- #author(isoxml, _out) ⇒ Object
- #configuration ⇒ Object
- #docid(isoxml, _out) ⇒ Object
-
#initialize(lang, script, locale, labels) ⇒ Metadata
constructor
A new instance of Metadata.
- #subtitle(_isoxml, _out) ⇒ Object
- #title(isoxml, _out) ⇒ Object
Constructor Details
#initialize(lang, script, locale, labels) ⇒ Metadata
Returns a new instance of Metadata.
10 11 12 13 14 15 16 17 |
# File 'lib/isodoc/m3aawg/metadata.rb', line 10 def initialize(lang, script, locale, labels) super here = File.dirname(__FILE__) set(:logo_html, File.(File.join(here, "html", "m3-logo.png"))) set(:logo_word, File.(File.join(here, "html", "logo.jpg"))) end |
Instance Method Details
#author(isoxml, _out) ⇒ Object
28 29 30 31 32 33 |
# File 'lib/isodoc/m3aawg/metadata.rb', line 28 def (isoxml, _out) set(:tc, nil) tc = isoxml.at(ns("//bibdata/ext/editorialgroup/committee")) set(:tc, tc.text) if tc super end |
#configuration ⇒ Object
6 7 8 |
# File 'lib/isodoc/m3aawg/metadata.rb', line 6 def configuration Metanorma::M3AAWG.configuration end |
#docid(isoxml, _out) ⇒ Object
35 36 37 38 |
# File 'lib/isodoc/m3aawg/metadata.rb', line 35 def docid(isoxml, _out) docnumber = isoxml.at(ns("//bibdata/docidentifier")) set(:docnumber, docnumber&.text) end |
#subtitle(_isoxml, _out) ⇒ Object
24 25 26 |
# File 'lib/isodoc/m3aawg/metadata.rb', line 24 def subtitle(_isoxml, _out) nil end |
#title(isoxml, _out) ⇒ Object
19 20 21 22 |
# File 'lib/isodoc/m3aawg/metadata.rb', line 19 def title(isoxml, _out) main = isoxml&.at(ns("//bibdata/title[@language='en']"))&.text set(:doctitle, main) end |