class MarkupMacro

Macro that can be used in MarkupNode

Usage:

node = MarkupNode(Clerq::Entities::Node.new(
  id: 'id', body: Some text that contains {{@@macro}}")
)
macro = Macro.new
macro.(node.body, node) # "Some text that contains [processed macro]"

Attributes

regex[R]
title[R]

Public Instance Methods

process(macro, node) click to toggle source

TODO: find more situable name Process macro that must be implemented in subclasses @param macro [String] macrotext @param node [Node] the context in which the macro is processed @return [String] a text processed by macro

# File lib/assets/lib/markup_macro.rb, line 18
def process(macro, node)
end