Module: IsoDoc::UN::Init
- Included in:
- HtmlConvert, PresentationXMLConvert, WordConvert
- Defined in:
- lib/isodoc/un/init.rb
Instance Method Summary collapse
- #fileloc(loc) ⇒ Object
- #i18n_init(lang, script, locale, i18nyaml = nil) ⇒ Object
- #metadata_init(lang, script, locale, labels) ⇒ Object
- #xref_init(lang, script, _klass, labels, options) ⇒ Object
Instance Method Details
#fileloc(loc) ⇒ Object
24 25 26 |
# File 'lib/isodoc/un/init.rb', line 24 def fileloc(loc) File.join(File.dirname(__FILE__), loc) end |
#i18n_init(lang, script, locale, i18nyaml = nil) ⇒ Object
19 20 21 22 |
# File 'lib/isodoc/un/init.rb', line 19 def i18n_init(lang, script, locale, i18nyaml = nil) @i18n = I18n.new(lang, script, locale: locale, i18nyaml: i18nyaml || @i18nyaml) end |
#metadata_init(lang, script, locale, labels) ⇒ Object
9 10 11 12 |
# File 'lib/isodoc/un/init.rb', line 9 def (lang, script, locale, labels) @meta = Metadata.new(lang, script, locale, labels) @meta.set(:toc, @toc) end |
#xref_init(lang, script, _klass, labels, options) ⇒ Object
14 15 16 17 |
# File 'lib/isodoc/un/init.rb', line 14 def xref_init(lang, script, _klass, labels, ) html = HtmlConvert.new(language: lang, script: script) @xrefs = Xref.new(lang, script, html, labels, ) end |