class Neo4j::AsciidoctorExtensions::StageSlugTreeProcessor
A tree processor that update the “slug” attribute depending on the “stage” attribute.
Constants
- TESTING_SLUG_PREFIX
Public Class Methods
new(config = nil)
click to toggle source
Calls superclass method
# File lib/neo4j/asciidoctor/extensions/attribute_update/extension.rb, line 31 def initialize(config = nil) super @config[:attr_name] = 'slug' @config[:update_rule] = lambda { |document, value| case document.attr('stage') when 'production' value else "#{TESTING_SLUG_PREFIX}#{value}" end } end