Class: Restapi::Markup::RDoc

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

Instance Method Summary collapse

Constructor Details

#initializeRDoc

Returns a new instance of RDoc.



7
8
9
10
11
# File 'lib/restapi/markup.rb', line 7

def initialize
  require 'rdoc'
  require 'rdoc/markup/to_html'
  @rdoc ||= ::RDoc::Markup::ToHtml.new
end

Instance Method Details

#to_html(text) ⇒ Object



13
14
15
# File 'lib/restapi/markup.rb', line 13

def to_html(text)
  @rdoc.convert(text)
end