Module: Mumukit::ContentType::BaseContentType
Instance Method Summary collapse
- #as_json(_options = {}) ⇒ Object
- #format_exception(e) ⇒ Object
- #to_html(content, options = {}) ⇒ Object
- #to_s ⇒ Object
Instance Method Details
#as_json(_options = {}) ⇒ Object
21 22 23 |
# File 'lib/mumukit/content_type.rb', line 21 def as_json(={}) name end |
#format_exception(e) ⇒ Object
7 8 9 |
# File 'lib/mumukit/content_type.rb', line 7 def format_exception(e) "#{title e.}\n#{code e.backtrace.join("\n")}" end |
#to_html(content, options = {}) ⇒ Object
11 12 13 14 15 |
# File 'lib/mumukit/content_type.rb', line 11 def to_html(content, ={}) content_html = htmlize content, content_html = Mumukit::ContentType::Sanitizer.sanitize(content_html) unless [:skip_sanitization] content_html&.html_safe end |
#to_s ⇒ Object
17 18 19 |
# File 'lib/mumukit/content_type.rb', line 17 def to_s name end |