File: rdoc.rb

package info (click to toggle)
ruby-github-markup 1.2.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 316 kB
  • ctags: 65
  • sloc: ruby: 281; python: 85; sh: 15; makefile: 13
file content (21 lines) | stat: -rw-r--r-- 398 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
require "rdoc"
require "rdoc/markup/to_html"

module GitHub
  module Markup
    class RDoc
      def initialize(content)
        @content = content
      end

      def to_html
        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
    end
  end
end