Module: Mumukit::ContentType

Defined in:
lib/mumukit/content_type.rb,
lib/mumukit/content_type/version.rb

Defined Under Namespace

Modules: BaseContentType, Emoji, Html, Markdown, Plain, Sanitizer

Constant Summary collapse

VERSION =
'1.12.1'

Class Method Summary collapse

Class Method Details

.for(type) ⇒ Object



32
33
34
# File 'lib/mumukit/content_type.rb', line 32

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

.parse(s) ⇒ Object



26
27
28
29
30
# File 'lib/mumukit/content_type.rb', line 26

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