Sha256: 583642267ddaf8d85cb1613c62d3f2ba87806eff4941513ae701452abcd76cf2

Contents?: true

Size: 345 Bytes

Versions: 9

Compression:

Stored size: 345 Bytes

Contents

class Module
  def markdown_on(*selectors, **options)
    selectors.each { |selector| _define_markdown_on(selector, options) }
  end

  private

  def _define_markdown_on(selector, options)
    define_method("#{selector}_html".to_sym) do |*args|
      Mumukit::ContentType::Markdown.to_html self.send(selector, *args), options
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
mumukit-content-type-1.12.1 lib/mumukit/content_type/with_markdown.rb
mumukit-content-type-1.12.0 lib/mumukit/content_type/with_markdown.rb
mumukit-content-type-1.11.1 lib/mumukit/content_type/with_markdown.rb
mumukit-content-type-1.11.0 lib/mumukit/content_type/with_markdown.rb
mumukit-content-type-1.10.0 lib/mumukit/content_type/with_markdown.rb
mumukit-content-type-1.9.0 lib/mumukit/content_type/with_markdown.rb
mumukit-content-type-1.8.1 lib/mumukit/content_type/with_markdown.rb
mumukit-content-type-1.8.0 lib/mumukit/content_type/with_markdown.rb
mumukit-content-type-1.7.0 lib/mumukit/content_type/with_markdown.rb