Class: GitHub::Markup::RDoc

Inherits:
Object
  • Object
show all
Defined in:
lib/github/markup/rdoc.rb

Instance Method Summary collapse

Constructor Details

#initialize(content) ⇒ RDoc

Returns a new instance of RDoc.



7
8
9
# File 'lib/github/markup/rdoc.rb', line 7

def initialize(content)
  @content = content
end

Instance Method Details

#to_htmlObject



11
12
13
14
15
16
17
18
# File 'lib/github/markup/rdoc.rb', line 11

def to_html
  if ::RDoc::VERSION.to_i >= 4
    h = ::RDoc::Markup::ToHtml.new(::RDoc::Options.new)
  else
    h = ::RDoc::Markup::ToHtml.new
  end
  h.convert(@content)
end