Sha256: fd5a9ce20f09f035ffe435359f55dec4335d12ba5974725cb701e354ec713746

Contents?: true

Size: 306 Bytes

Versions: 17

Compression:

Stored size: 306 Bytes

Contents

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

  private

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

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
mumukit-content-type-1.6.1 lib/mumukit/content_type/with_markdown.rb
mumukit-content-type-1.6.0 lib/mumukit/content_type/with_markdown.rb
mumukit-content-type-1.5.1 lib/mumukit/content_type/with_markdown.rb
mumukit-content-type-1.5.0 lib/mumukit/content_type/with_markdown.rb
mumukit-content-type-1.4.1 lib/mumukit/content_type/with_markdown.rb
mumukit-content-type-1.4.0 lib/mumukit/content_type/with_markdown.rb
mumukit-content-type-1.3.1 lib/mumukit/content_type/with_markdown.rb
mumukit-content-type-1.3.0 lib/mumukit/content_type/with_markdown.rb
mumukit-content-type-1.2.0 lib/mumukit/content_type/with_markdown.rb
mumukit-content-type-1.1.0 lib/mumukit/content_type/with_markdown.rb
mumukit-content-type-1.0.0 lib/mumukit/content_type/with_markdown.rb
mumukit-content-type-0.6.0 lib/mumukit/content_type/with_markdown.rb
mumukit-content-type-0.5.1 lib/mumukit/content_type/with_markdown.rb
mumukit-content-type-0.5.0 lib/mumukit/content_type/with_markdown.rb
mumukit-content-type-0.4.0 lib/mumukit/content_type/with_markdown.rb
mumukit-content-type-0.3.0 lib/mumukit/content_type/with_markdown.rb
mumukit-content-type-0.2.1 lib/mumukit/content_type/with_markdown.rb