Class: Nanoc::Filters::RDoc
- Inherits:
-
Nanoc::Filter
- Object
- Context
- Nanoc::Filter
- Nanoc::Filters::RDoc
- Defined in:
- lib/nanoc/filters/rdoc.rb
Constant Summary
Constant Summary
Constants inherited from Nanoc::Filter
Nanoc::Filter::TMP_BINARY_ITEMS_DIR
Instance Attribute Summary
Attributes inherited from Nanoc::Filter
Instance Method Summary (collapse)
-
- (String) run(content, params = {})
Runs the content through RDoc::Markup.
Methods inherited from Nanoc::Filter
#depend_on, #filename, from_binary?, #initialize, #output_filename, requires, setup, #setup_and_run, to_binary?, type
Methods included from PluginRegistry::PluginMethods
#all, #identifier, #identifiers, #named, #register
Methods inherited from Context
Constructor Details
This class inherits a constructor from Nanoc::Filter
Instance Method Details
- (String) run(content, params = {})
Runs the content through RDoc::Markup. This method takes no options.
18 19 20 21 22 23 24 25 26 |
# File 'lib/nanoc/filters/rdoc.rb', line 18 def run(content, params={}) if /^2.0/ =~ RUBY_VERSION = ::RDoc::Options.new to_html = ::RDoc::Markup::ToHtml.new() else to_html = ::RDoc::Markup::ToHtml.new end ::RDoc::Markup.new.convert(content, to_html) end |