Sha256: 34ea4bebffaf4f9fab41b3b8558572eeb55dda27b91950b8360fd798bcfdd320

Contents?: true

Size: 678 Bytes

Versions: 1

Compression:

Stored size: 678 Bytes

Contents

require 'mumukit/core'
require 'redcarpet'

module Mumukit
  module ContentType
    module BaseContentType
      def format_exception(e)
        "#{title e.message}\n#{code e.backtrace.join("\n")}"
      end
    end

    def self.parse(s)
      "Mumukit::ContentType::#{s.to_s.titlecase}".constantize
    rescue
      raise "unknown content_type #{s}"
    end

    def self.for(type)
      parse(type)
    end
  end
end

require_relative './content_type/md_emoji'
require_relative './content_type/markdown'
require_relative './content_type/with_markdown'
require_relative './content_type/plain'
require_relative './content_type/html'
require_relative './content_type/gobstones'

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mumukit-content-type-1.2.0 lib/mumukit/content_type.rb