Module: Eggshell::MacroHandler

Overview

Macros are extensible functions that can do a lot of things:

  • include other Eggshell documents into current document

  • process part of a document into a variable

  • do conditional processing

  • do loop processing

  • etc.

A typical macro call looks like this: ‘@macro(param, param, …)` and must be the first item on the line (excluding whitespace).

If a macro encloses a chunk of document, it would generally look like this:

pre. @block_macro(param, …) misc content misc content

Defined Under Namespace

Modules: Defaults

Instance Method Summary collapse

Instance Method Details

#process(buffer, macname, args, lines, indent) ⇒ Object



25
26
# File 'lib/eggshell/macro-handler.rb', line 25

def process(buffer, macname, args, lines, indent)
end

#set_processor(proc) ⇒ Object



22
23
# File 'lib/eggshell/macro-handler.rb', line 22

def set_processor(proc)
end