lib/github/markup/rdoc.rb (view raw)
1require "rdoc"
2require "rdoc/markup/to_html"
3
4module GitHub
5 module Markup
6 class RDoc
7 def initialize(content)
8 @content = content
9 end
10
11 def to_html
12 if Gem::Version.new(::RDoc::VERSION) < Gem::Version.new('4.0.0')
13 h = ::RDoc::Markup::ToHtml.new
14 else
15 h = ::RDoc::Markup::ToHtml.new(::RDoc::Options.new)
16 end
17 h.convert(@content)
18 end
19 end
20 end
21end