Class: Apipie::Markup::RDoc
- Inherits:
-
Object
- Object
- Apipie::Markup::RDoc
- Defined in:
- lib/apipie/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 12 13 14 15 |
# File 'lib/apipie/markup.rb', line 7 def initialize require 'rdoc' require 'rdoc/markup/to_html' if Gem::Version.new(::RDoc::VERSION) < Gem::Version.new('4.0.0') @rdoc ||= ::RDoc::Markup::ToHtml.new() else @rdoc ||= ::RDoc::Markup::ToHtml.new(::RDoc::Options.new) end end |
Instance Method Details
#to_html(text) ⇒ Object
17 18 19 |
# File 'lib/apipie/markup.rb', line 17 def to_html(text) @rdoc.convert(text) end |