Class: Metanorma::Unece::Input::Asciidoc

Inherits:
Input::Asciidoc
  • Object
show all
Defined in:
lib/metanorma/unece/input.rb

Instance Method Summary collapse

Instance Method Details

#extract_options(file) ⇒ Object



7
8
9
10
11
12
13
14
# File 'lib/metanorma/unece/input.rb', line 7

def extract_options(file)
  head = file.sub(/\n\n.*$/m, "\n")
  /\n(?<toc>:toc:)/ =~ head
  new_options = {
    toc: defined?(toc)
  }.reject { |_, val| val.nil? }
  super.merge(new_options)
end