Module: Eggshell::FormatHandler

Included in:
Bundles::Basic::BasicFormatHandlers
Defined in:
lib/eggshell/format-handler.rb

Overview

Interface for handling inline formatting. Markup follows this general structure: + string + close_delim}. Opening and closing delimiters are defined by the handler.

Defined Under Namespace

Modules: Utils

Instance Method Summary collapse

Instance Method Details

#format(tag, str) ⇒ Object

Parameters:

  • String|MatchData

    tag The opening delimeter.

  • String

    str The string between delimeters.



16
17
# File 'lib/eggshell/format-handler.rb', line 16

def format(tag, str)
end

#set_processor(proc, opts = nil) ⇒ Object



5
6
7
8
9
10
11
12
# File 'lib/eggshell/format-handler.rb', line 5

def set_processor(proc, opts = nil)
  @eggopts = opts || {}
  @eggshell = proc
  @eggshell.add_format_handler(self, @fmt_delimeters)
  if self.respond_to?(:post_processor)
    post_processor
  end
end