Class: Blogit::Parsers::TextileParser
- Inherits:
-
Object
- Object
- Blogit::Parsers::TextileParser
- Defined in:
- lib/blogit/parsers/textile_parser.rb
Instance Attribute Summary collapse
-
#content ⇒ Object
readonly
A String containing the content to be parsed.
Instance Method Summary collapse
-
#initialize(content) ⇒ TextileParser
constructor
A new instance of TextileParser.
-
#parsed ⇒ Object
The parsed content .
Constructor Details
#initialize(content) ⇒ TextileParser
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
#content ⇒ Object (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
#parsed ⇒ Object
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 |