Module: IsoDoc::Generic::Init
Instance Method Summary
collapse
-
#i18n_init(lang, script, locale, i18nyaml = nil) ⇒ Object
-
#metadata_init(lang, script, locale, i18n) ⇒ Object
-
#xref_init(lang, script, _klass, i18n, options) ⇒ Object
Methods included from Utils
#baselocation, #configuration, #fileloc
Instance Method Details
#i18n_init(lang, script, locale, i18nyaml = nil) ⇒ Object
19
20
21
22
23
24
|
# File 'lib/isodoc/generic/init.rb', line 19
def i18n_init(lang, script, locale, i18nyaml = nil)
f = Metanorma::Generic.configuration.i18nyaml
f = nil unless f.is_a? String
@i18n = I18n.new(
lang, script, locale: locale, i18nyaml: i18nyaml || f || @i18nyaml)
end
|
10
11
12
|
# File 'lib/isodoc/generic/init.rb', line 10
def metadata_init(lang, script, locale, i18n)
@meta = Metadata.new(lang, script, locale, i18n)
end
|
#xref_init(lang, script, _klass, i18n, options) ⇒ Object
14
15
16
17
|
# File 'lib/isodoc/generic/init.rb', line 14
def xref_init(lang, script, _klass, i18n, options)
html = HtmlConvert.new(language: lang, script: script)
@xrefs = Xref.new(lang, script, html, i18n, options)
end
|