Class: Malt::Formats::Textile

Inherits:
Abstract
  • Object
show all
Defined in:
lib/malt/formats/textile.rb

Instance Attribute Summary

Attributes inherited from Abstract

#options

Instance Method Summary collapse

Methods inherited from Abstract

#default, engine, #engine, #extensions, extensions, #file, #parse_type_and_data, #refile, register, #render, #subtype, #text, #to, #to_s, #type

Instance Method Details

#htmlObject



12
13
14
# File 'lib/malt/formats/textile.rb', line 12

def html
  render_engine.render(:format=>:html, :text=>text, :file=>file)
end

#textileObject Also known as: tt



17
18
19
# File 'lib/malt/formats/textile.rb', line 17

def textile
  text
end

#to_htmlObject



25
26
27
28
# File 'lib/malt/formats/textile.rb', line 25

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

#to_textileObject Also known as: to_tt



31
32
33
# File 'lib/malt/formats/textile.rb', line 31

def to_textile
  self
end