Class: Nsf::Fixedblock

Inherits:
Paragraph show all
Defined in:
lib/nsf.rb,
lib/nsf/formats/nsf.rb,
lib/nsf/formats/rtf.rb,
lib/nsf/formats/html.rb

Constant Summary

Constants inherited from Paragraph

Paragraph::BOLD_ITALIC_REGEX, Paragraph::PDF_PARAGRAPH_LEADING

Instance Attribute Summary

Attributes inherited from Paragraph

#text

Instance Method Summary collapse

Methods inherited from Paragraph

from_nsf, #initialize, #to_html_fragment, #to_nsf, #to_pdf

Constructor Details

This class inherits a constructor from Nsf::Paragraph

Instance Method Details

#to_htmlObject



158
159
160
# File 'lib/nsf/formats/html.rb', line 158

def to_html
  "<pre>#{CGI.escapeHTML(text.gsub(/^    /, ''))}</pre>"
end

#to_rtfObject



59
60
61
# File 'lib/nsf/formats/rtf.rb', line 59

def to_rtf
  @text.gsub("\n", " ")
end