Class: GitHub::Markup::RDoc

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

Instance Attribute Summary

Attributes inherited from Implementation

#languages, #regexp

Instance Method Summary collapse

Methods inherited from Implementation

#load, #match?

Constructor Details

#initializeRDoc

Returns a new instance of RDoc.



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

def initialize
  super(/rdoc/, ["RDoc"])
end

Instance Method Details

#nameObject



21
22
23
# File 'lib/github/markup/rdoc.rb', line 21

def name
  "rdoc"
end

#render(filename, content, options: {}) ⇒ Object



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

def render(filename, content, options: {})
  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