class Bobkit::MarkdownBridge::MarkdownHandler
Public Instance Methods
compile(file, options={})
click to toggle source
# File lib/bobkit/markdown_bridge.rb, line 12 def compile(file, options={}) markdown = RDiscount.new file_content file content = markdown.to_html options[:content] = content content = render options if options[:layout] content end
Private Instance Methods
file_content(basename)
click to toggle source
# File lib/bobkit/markdown_bridge.rb, line 22 def file_content(basename) File.read markdown_file basename end
markdown_file(basename)
click to toggle source
# File lib/bobkit/markdown_bridge.rb, line 26 def markdown_file(basename) "#{markdown_folder}/#{basename}.md" end