Class: Shift::Redcarpet

Inherits:
Interface show all
Defined in:
lib/shift/i/redcarpet.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Interface

available?, default, engine_class, instructions, keep_extension?, new, #rename, require_libs

Constructor Details

#initialize(*switches) ⇒ Redcarpet

Returns a new instance of Redcarpet.



12
13
14
# File 'lib/shift/i/redcarpet.rb', line 12

def initialize(*switches)
  @switches = switches
end

Class Method Details

.gem_dependenciesObject



4
5
6
# File 'lib/shift/i/redcarpet.rb', line 4

def self.gem_dependencies
  %w{redcarpet}
end

.target_formatObject



8
9
10
# File 'lib/shift/i/redcarpet.rb', line 8

def self.target_format
  'html'
end

Instance Method Details

#process(str) ⇒ Object



16
17
18
# File 'lib/shift/i/redcarpet.rb', line 16

def process(str)
  ::Redcarpet.new(str, *@switches).to_html
end