Module: IsoDoc::IHO::Init

Included in:
HtmlConvert, PresentationXMLConvert, WordConvert
Defined in:
lib/isodoc/iho/init.rb

Instance Method Summary collapse

Instance Method Details

#bibrenderer(options = {}) ⇒ Object



25
26
27
28
# File 'lib/isodoc/iho/init.rb', line 25

def bibrenderer(options = {})
  ::Relaton::Render::IHO::General.new(options.merge(language: @lang,
                                                    i18nhash: @i18n.get))
end

#i18n_init(lang, script, locale, i18nyaml = nil) ⇒ Object



17
18
19
20
21
22
23
# File 'lib/isodoc/iho/init.rb', line 17

def i18n_init(lang, script, locale, i18nyaml = nil)
  @i18n = I18n.new(
    lang, script, locale: locale,
                  i18nyaml: i18nyaml ||
    Metanorma::IHO.configuration.i18nyaml || @i18nyaml
  )
end

#info(isoxml, out) ⇒ Object



30
31
32
33
# File 'lib/isodoc/iho/init.rb', line 30

def info(isoxml, out)
  @meta.series isoxml, out
  super
end

#metadata_init(lang, script, locale, labels) ⇒ Object



8
9
10
# File 'lib/isodoc/iho/init.rb', line 8

def (lang, script, locale, labels)
  @meta = .new(lang, script, locale, labels)
end

#omit_docid_prefix(prefix) ⇒ Object



35
36
37
38
39
# File 'lib/isodoc/iho/init.rb', line 35

def omit_docid_prefix(prefix)
  return true if prefix == "IHO"

  super
end

#xref_init(lang, script, _klass, labels, options) ⇒ Object



12
13
14
15
# File 'lib/isodoc/iho/init.rb', line 12

def xref_init(lang, script, _klass, labels, options)
  html = HtmlConvert.new(language: lang, script: script)
  @xrefs = Xref.new(lang, script, html, labels, options)
end