Sha256: 218d0b4c20fc7ab57b14389c75baed0b417123eb00aad14870a9b193143f98a1

Contents?: true

Size: 382 Bytes

Versions: 5

Compression:

Stored size: 382 Bytes

Contents

module Mumukit::ContentType::Plain
  extend Mumukit::ContentType::BaseContentType

  def self.title(title)
    "#{title}:"
  end

  def self.code(code)
    "\n-----\n#{code}\n-----\n\n"
  end

  def self.to_html(content)
    "<pre>#{ERB::Util.html_escape content}</pre>".html_safe
  end

  def self.name
    'plain'
  end

  def self.enumerate(items)
    items.join("\n")
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
mumukit-content-type-1.12.1 lib/mumukit/content_type/plain.rb
mumukit-content-type-1.12.0 lib/mumukit/content_type/plain.rb
mumukit-content-type-1.11.1 lib/mumukit/content_type/plain.rb
mumukit-content-type-1.11.0 lib/mumukit/content_type/plain.rb
mumukit-content-type-1.10.0 lib/mumukit/content_type/plain.rb