Sha256: 11198f1b08497f99584f4f261911df837d45792c182ee5711b8ec37357fc6e5c
Contents?: true
Size: 723 Bytes
Versions: 2
Compression:
Stored size: 723 Bytes
Contents
module Restapi module Markup class RDoc def initialize require 'rdoc' require 'rdoc/markup/to_html' @rdoc ||= ::RDoc::Markup::ToHtml.new end def to_html(text) @rdoc.convert(text) end end class Markdown def initialize require 'redcarpet' @redcarpet ||= ::Redcarpet::Markdown.new(::Redcarpet::Render::HTML.new) end def to_html(text) @redcarpet.render(text) end end class Textile def initialize require 'RedCloth' end def to_html(text) RedCloth.new(text).to_html end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
restapi-0.0.5 | lib/restapi/markup.rb |
restapi-0.0.3 | lib/restapi/markup.rb |