Class: Metanorma::Collection::Renderer::DocOptionsNode

Inherits:
Object
  • Object
show all
Defined in:
lib/metanorma/collection/renderer/render_word.rb

Instance Method Summary collapse

Constructor Details

#initialize(directives, dir) ⇒ DocOptionsNode

Returns a new instance of DocOptionsNode.



115
116
117
118
119
120
121
122
123
# File 'lib/metanorma/collection/renderer/render_word.rb', line 115

def initialize(directives, dir)
  @dir = dir
  @wordcoverpage =
    Util::hash_key_detect(directives, "document-word-coverpage",
                          @wordcoverpage)
  @wordintropage =
    Util::hash_key_detect(directives, "document-word-intropage",
                          @wordintropage)
end

Instance Method Details

#attr(key) ⇒ Object



125
126
127
128
129
130
# File 'lib/metanorma/collection/renderer/render_word.rb', line 125

def attr(key)
  case key
  when "wordcoverpage" then Util::rel_path_resolve(@dir, @wordcoverpage)
  when "wordintropage" then Util::rel_path_resolve(@dir, @wordintropage)
  end
end