Class: Blogit::Parsers::TextileParser

Inherits:
Object
  • Object
show all
Defined in:
lib/blogit/parsers/textile_parser.rb

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (TextileParser) initialize(content)

Returns a new instance of TextileParser


10
11
12
# File 'lib/blogit/parsers/textile_parser.rb', line 10

def initialize(content)
  @content = content
end

Instance Attribute Details

- (Object) content (readonly)

A String containing the content to be parsed


8
9
10
# File 'lib/blogit/parsers/textile_parser.rb', line 8

def content
  @content
end

Instance Method Details

- (Object) parsed

The parsed content

Returns:

  • an HTML safe String


17
18
19
# File 'lib/blogit/parsers/textile_parser.rb', line 17

def parsed
  RedCloth.new(content).to_html
end