Class: Malt::Format::MediaWiki

Inherits:
Abstract show all
Defined in:
lib/malt/formats/mediawiki.rb

Instance Attribute Summary

Attributes inherited from Abstract

#options

Instance Method Summary collapse

Methods inherited from Abstract

#default, #engine, engine, extensions, #extensions, #file, file_extension, #file_read, #file_type, #parse_type_from_data, #refile, register, #render, #render_into, #rendering_parameters, #scope_vs_data, #subtype, #text, #to, #to_default, #to_s, #type, #with, #with!

Instance Method Details

#html(*data, &content) ⇒ Object



28
29
30
31
# File 'lib/malt/formats/mediawiki.rb', line 28

def html(*data, &content)
  #render_engine.render(:text=>text, :file=>file, :format=>:html)
  render_into(:html, *data, &content)
end

#mediawikiObject Also known as: mw



15
16
17
# File 'lib/malt/formats/mediawiki.rb', line 15

def mediawiki(*)
  text
end

#to_htmlObject

Convert to HTML.



34
35
36
37
# File 'lib/malt/formats/mediawiki.rb', line 34

def to_html(*)
  opts = options.merge(:text=>html, :file=>refile(:html), :type=>:html)
  HTML.new(opts)
end

#to_mediawikiObject Also known as: to_mw



20
21
22
# File 'lib/malt/formats/mediawiki.rb', line 20

def to_mediawiki(*)
  self
end