Class: Gollum::Filter

Inherits:
Object
  • Object
show all
Includes:
Helpers
Defined in:
lib/gollum-lib/filter.rb

Defined Under Namespace

Classes: Code, Emoji, Macro, Metadata, PlainText, PlantUML, RemoteCode, Render, Sanitize, TOC, Tags, WSD

Instance Method Summary collapse

Methods included from Helpers

#trim_leading_slash

Constructor Details

#initialize(markup) ⇒ Filter

Setup the object. Sets ‘@markup` to be the instance of Gollum::Markup that is running this filter chain, and sets `@map` to be an empty hash (for use in your extract/process operations).



53
54
55
56
# File 'lib/gollum-lib/filter.rb', line 53

def initialize(markup)
  @markup = markup
  @map    = {}
end

Instance Method Details

#extract(_d) ⇒ Object

Raises:

  • (RuntimeError)


58
59
60
61
# File 'lib/gollum-lib/filter.rb', line 58

def extract(_d)
  raise RuntimeError,
        "#{self.class} has not implemented ##extract!"
end

#process(_d) ⇒ Object

Raises:

  • (RuntimeError)


63
64
65
66
# File 'lib/gollum-lib/filter.rb', line 63

def process(_d)
  raise RuntimeError,
        "#{self.class} has not implemented ##process!"
end