Class: GrafanaReporter::Asciidoctor::ShowHelpIncludeProcessor

Inherits:
Asciidoctor::Extensions::IncludeProcessor
  • Object
show all
Includes:
ProcessorMixin
Defined in:
lib/grafana_reporter/asciidoctor/show_help_include_processor.rb

Overview

Implements the hook

include::grafana_help[]

Shows all available options for the asciidoctor grafana reporter in a asciidoctor readable form.

Used document parameters

None

Instance Method Summary collapse

Methods included from ProcessorMixin

#build_attribute_hash, #current_report

Instance Method Details

#build_demo_entry(_panel) ⇒ Object



30
31
32
# File 'lib/grafana_reporter/asciidoctor/show_help_include_processor.rb', line 30

def build_demo_entry(_panel)
  'include::grafana_help[]'
end

#handles?(target) ⇒ Boolean

:nodoc:

Returns:

  • (Boolean)


16
17
18
# File 'lib/grafana_reporter/asciidoctor/show_help_include_processor.rb', line 16

def handles?(target)
  target.start_with? 'grafana_help'
end

#process(_doc, reader, _target, _attrs) ⇒ Object

:nodoc:



21
22
23
24
25
26
27
# File 'lib/grafana_reporter/asciidoctor/show_help_include_processor.rb', line 21

def process(_doc, reader, _target, _attrs)
  # return if @report.cancel
  @report.next_step
  @report.logger.debug('Processing ShowHelpIncludeProcessor')

  reader.unshift_lines Help.new.asciidoctor.split("\n")
end