Class: GrafanaReporter::Asciidoctor::Help

Inherits:
Object
  • Object
show all
Defined in:
lib/grafana_reporter/asciidoctor/help.rb

Overview

This class generates the functional help documentation for the asciidoctor report. It can create the documentation for github markdown, as well as in asciidoctor syntax.

Instance Method Summary collapse

Instance Method Details

#asciidoctor(headline_level = 2) ⇒ String

Returns asciidoctor compatible documentation.

Parameters:

  • headline_level (Integer) (defaults to: 2)

    top level of headline

Returns:

  • (String)

    asciidoctor compatible documentation



12
13
14
# File 'lib/grafana_reporter/asciidoctor/help.rb', line 12

def asciidoctor(headline_level = 2)
  help_text(asciidoctor_options.merge(level: headline_level))
end

#github(headline_level = 2) ⇒ String

Returns github markdown compatible documentation.

Parameters:

  • headline_level (Integer) (defaults to: 2)

    top level of headline

Returns:

  • (String)

    github markdown compatible documentation



18
19
20
# File 'lib/grafana_reporter/asciidoctor/help.rb', line 18

def github(headline_level = 2)
  "#{toc}\n\n#{help_text(github_options.merge(level: headline_level))}"
end