class MarkdownToSimpleHtml::MarkdownParser
Public Class Methods
new(filename)
click to toggle source
# File lib/markdown_to_simple_html.rb, line 7 def initialize(filename) @contents = IO.readlines("#{filename}.md").join @parser = Redcarpet::Markdown.new(Redcarpet::Render::HTML, :autolink => true, :hard_wrap => true) end
Public Instance Methods
to_html()
click to toggle source
# File lib/markdown_to_simple_html.rb, line 12 def to_html @parser.render(@contents) end