Class: Metanorma::CollectionRenderer::DocOptionsNode

Inherits:
Object
  • Object
show all
Defined in:
lib/metanorma/collection_render_word.rb

Instance Method Summary collapse

Constructor Details

#initialize(directives, dir) ⇒ DocOptionsNode

Returns a new instance of DocOptionsNode.



113
114
115
116
117
118
119
120
121
# File 'lib/metanorma/collection_render_word.rb', line 113

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



123
124
125
126
127
128
# File 'lib/metanorma/collection_render_word.rb', line 123

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