Module: IsoDoc::Ogc::Init
- Included in:
- HtmlConvert, PresentationXMLConvert, WordConvert
- Defined in:
- lib/isodoc/ogc/init.rb
Instance Method Summary collapse
- #bibrenderer(options = {}) ⇒ Object
- #fileloc(loc) ⇒ Object
- #i18n_init(lang, script, locale, i18nyaml = nil) ⇒ Object
- #metadata_init(lang, script, locale, labels) ⇒ Object
- #submittingorgs_path ⇒ Object
- #xref_init(lang, script, _klass, labels, options) ⇒ Object
Instance Method Details
#bibrenderer(options = {}) ⇒ Object
23 24 25 26 |
# File 'lib/isodoc/ogc/init.rb', line 23 def bibrenderer( = {}) ::Relaton::Render::Ogc::General.new( .merge(language: @lang, script: @script, i18nhash: @i18n.get)) end |
#fileloc(loc) ⇒ Object
28 29 30 |
# File 'lib/isodoc/ogc/init.rb', line 28 def fileloc(loc) File.join(File.dirname(__FILE__), loc) end |
#i18n_init(lang, script, locale, i18nyaml = nil) ⇒ Object
18 19 20 21 |
# File 'lib/isodoc/ogc/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
9 10 11 |
# File 'lib/isodoc/ogc/init.rb', line 9 def (lang, script, locale, labels) = Metadata.new(lang, script, locale, labels) end |
#submittingorgs_path ⇒ Object
32 33 34 35 36 |
# File 'lib/isodoc/ogc/init.rb', line 32 def submittingorgs_path "//xmlns:bibdata/xmlns:contributor[xmlns:role/@type = 'author']/" \ "xmlns:organization[xmlns:name != 'Open Geospatial Consortium' and " \ "(not(xmlns:abbreviation) or xmlns:abbreviation != 'OGC')]/xmlns:name" end |
#xref_init(lang, script, _klass, labels, options) ⇒ Object
13 14 15 16 |
# File 'lib/isodoc/ogc/init.rb', line 13 def xref_init(lang, script, _klass, labels, ) html = HtmlConvert.new(language: lang, script: script) @xrefs = Xref.new(lang, script, html, labels, ) end |