Class: RevealCK::Markdown::PreProcessor

Inherits:
Object
  • Object
show all
Defined in:
lib/reveal-ck/markdown/pre_processor.rb

Overview

This class embodies the preprocessing that starts with a traditional Markdown document and turns it into something that can later “become” reveal.js slides.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(doc) ⇒ PreProcessor

Returns a new instance of PreProcessor.



8
9
10
# File 'lib/reveal-ck/markdown/pre_processor.rb', line 8

def initialize(doc)
  @doc = doc
end

Instance Attribute Details

#docObject (readonly)

Returns the value of attribute doc.



7
8
9
# File 'lib/reveal-ck/markdown/pre_processor.rb', line 7

def doc
  @doc
end

Instance Method Details

#processObject



12
13
14
15
16
17
18
# File 'lib/reveal-ck/markdown/pre_processor.rb', line 12

def process
  strip_whitespace
  PreProcessorForEmoji.new(doc).process
  PreProcessorForDividers.new(doc).process
  PreProcessorTransforms.new(doc).process
  doc.lstrip
end