Class: GrafanaReporter::Asciidoctor::ShowHelpIncludeProcessor
- Inherits:
-
Asciidoctor::Extensions::IncludeProcessor
- Object
- Asciidoctor::Extensions::IncludeProcessor
- GrafanaReporter::Asciidoctor::ShowHelpIncludeProcessor
- 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
- #build_demo_entry(_panel) ⇒ Object
-
#handles?(target) ⇒ Boolean
:nodoc:.
-
#process(_doc, reader, _target, _attrs) ⇒ Object
:nodoc:.
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:
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 |