Malt  Malt::Format::Text

[Validate]
Generated with RDazzle Newfish 1.4.0

Text

Plain text format. Plain text documents are uniqu in that they can be transformed into any other type of document. For example, applying to_html in text doesn’t actually transform the source text in any way. Rather it simply “informs” Malt to treat the text as HTML.

Public Instance Methods

method_missing(sym, *args, &block) click to toggle source
    # File lib/malt/formats/text.rb, line 27
27:     def method_missing(sym, *args, &block)
28:       if md = /^to_/.match(sym.to_s)
29:         type = md.post_match.to_sym
30:         opts = options.merge(:type=>type, :file=>refile(type))
31:         return Malt.text(text, opts)
32:       end
33:       super(sym, *args, &block)
34:     end
to_txt(*) click to toggle source
    # File lib/malt/formats/text.rb, line 22
22:     def to_txt(*)
23:       self
24:     end
txt(*) click to toggle source
    # File lib/malt/formats/text.rb, line 17
17:     def txt(*)
18:       text
19:     end

Private Instance Methods

render_engine() click to toggle source
 Returns a PDF object.

def to_pdf

  PDF.new(:text=>text,:file=>refile(:pdf))

end

    # File lib/malt/formats/text.rb, line 48
48:       def render_engine
49:       end

Disabled; run with --debug to generate this.