Class: Restapi::Markup::RDoc
- Inherits:
-
Object
- Object
- Restapi::Markup::RDoc
- Defined in:
- lib/restapi/markup.rb
Instance Method Summary collapse
-
#initialize ⇒ RDoc
constructor
A new instance of RDoc.
- #to_html(text) ⇒ Object
Constructor Details
#initialize ⇒ RDoc
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 |