Class: NishisukeBlogSyntax::RawText
- Inherits:
-
Object
- Object
- NishisukeBlogSyntax::RawText
- Defined in:
- lib/nishisuke_blog_syntax/raw_text.rb
Instance Method Summary collapse
-
#initialize(text) ⇒ RawText
constructor
A new instance of RawText.
- #to_html ⇒ Object
Constructor Details
#initialize(text) ⇒ RawText
Returns a new instance of RawText.
10 11 12 |
# File 'lib/nishisuke_blog_syntax/raw_text.rb', line 10 def initialize(text) @text = text.gsub(/\R/, "\n") end |
Instance Method Details
#to_html ⇒ Object
14 15 16 17 18 |
# File 'lib/nishisuke_blog_syntax/raw_text.rb', line 14 def to_html self.class.html_formatters.inject(text) do |html, f| f.format(html) end end |