Class: Vidibus::Textile::Doc

Inherits:
RedCloth::TextileDoc
  • Object
show all
Defined in:
lib/vidibus/textile.rb

Instance Method Summary collapse

Instance Method Details

#to_text(options = {}) ⇒ Object

Returns plain text without markup. If option :plain is true, newlines will be removed.



22
23
24
25
26
27
28
# File 'lib/vidibus/textile.rb', line 22

def to_text(options = {})
  text = strip_html(self.to_html)
  if options[:plain] == true
    return strip_newlines(text)
  end
  text
end