Module: IsoDoc::JIS::Init
- Included in:
- HtmlConvert, PresentationXMLConvert, WordConvert
- Defined in:
- lib/isodoc/jis/init.rb
Instance Method Summary collapse
- #i18n_init(lang, script, locale, i18nyaml = nil) ⇒ Object
- #metadata_init(lang, script, locale, labels) ⇒ Object
- #omit_docid_prefix(prefix) ⇒ Object
- #std_docid_semantic(text) ⇒ Object
- #xref_init(lang, script, _klass, labels, options) ⇒ Object
Instance Method Details
#i18n_init(lang, script, locale, i18nyaml = nil) ⇒ Object
18 19 20 21 |
# File 'lib/isodoc/jis/init.rb', line 18 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
8 9 10 |
# File 'lib/isodoc/jis/init.rb', line 8 def (lang, script, locale, labels) @meta = Metadata.new(lang, script, locale, labels) end |
#omit_docid_prefix(prefix) ⇒ Object
23 24 25 26 27 |
# File 'lib/isodoc/jis/init.rb', line 23 def omit_docid_prefix(prefix) return true if prefix.nil? || prefix.empty? super || %w(JIS).include?(prefix) end |
#std_docid_semantic(text) ⇒ Object
29 30 31 |
# File 'lib/isodoc/jis/init.rb', line 29 def std_docid_semantic(text) text end |
#xref_init(lang, script, _klass, labels, options) ⇒ Object
12 13 14 15 16 |
# File 'lib/isodoc/jis/init.rb', line 12 def xref_init(lang, script, _klass, labels, ) @xrefs = Xref.new(lang, script, HtmlConvert.new(language: lang, script: script), labels, ) end |