Class: NishisukeBlogSyntax::RawText

Inherits:
Object
  • Object
show all
Defined in:
lib/nishisuke_blog_syntax/raw_text.rb

Instance Method Summary collapse

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_htmlObject



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