Sha256: 8f5aa33c37dfd444fc6e98570386575db757792daf4b9fef57d4355a5b80f355

Contents?: true

Size: 749 Bytes

Versions: 44

Compression:

Stored size: 749 Bytes

Contents

module Apipie

  module Markup

    class RDoc

      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

      def to_html(text)
        @rdoc.convert(text)
      end

    end

    class Markdown

      def initialize
        require 'maruku'
      end

      def to_html(text)
        Maruku.new(text).to_html
      end

    end

    class Textile

      def initialize
        require 'RedCloth'
      end

      def to_html(text)
        RedCloth.new(text).to_html
      end

    end

  end
end

Version data entries

44 entries across 44 versions & 3 rubygems

Version Path
apipie-rails-0.5.17 lib/apipie/markup.rb
apipie-rails-0.5.16 lib/apipie/markup.rb
apipierails3-0.0.1 lib/apipie/markup.rb
apipie-rails-0.5.15 lib/apipie/markup.rb
apipie-rails-0.5.14 lib/apipie/markup.rb
apipie-rails-0.5.13 lib/apipie/markup.rb
apipie-rails-0.5.12 lib/apipie/markup.rb
apipie-rails-0.5.11 lib/apipie/markup.rb
apipie-rails-0.5.10 lib/apipie/markup.rb
apipie-rails-0.5.9 lib/apipie/markup.rb
apipie-rails-0.5.8 lib/apipie/markup.rb
apipie-rails-0.5.7 lib/apipie/markup.rb
apipie-rails-0.5.6 lib/apipie/markup.rb
apipie-rails-0.5.5 lib/apipie/markup.rb
apipie-rails-0.5.4 lib/apipie/markup.rb
apipie-rails-0.5.3 lib/apipie/markup.rb
apipie-rails-0.5.2 lib/apipie/markup.rb
apipie-rails-0.5.1 lib/apipie/markup.rb
apipie-rails-0.5.0 lib/apipie/markup.rb
apipie-rails-0.4.0 lib/apipie/markup.rb