Class: HostConnect::RtfDocument
- Inherits:
-
Object
- Object
- HostConnect::RtfDocument
- Defined in:
- lib/hostconnect/rtf_document.rb
Overview
For setting up simple RTF Documents
Instance Method Summary collapse
-
#initialize(paragraphs) ⇒ RtfDocument
constructor
A new instance of RtfDocument.
- #to_rtf ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(paragraphs) ⇒ RtfDocument
Returns a new instance of RtfDocument.
4 5 6 7 8 9 |
# File 'lib/hostconnect/rtf_document.rb', line 4 def initialize(paragraphs) @document = RTF::Document.new(RTF::Font.new(RTF::Font::ROMAN, 'Times New Roman')) paragraphs.each do |p| @document.paragraph << p end end |
Instance Method Details
#to_rtf ⇒ Object
11 12 13 |
# File 'lib/hostconnect/rtf_document.rb', line 11 def to_rtf @document.to_rtf end |
#to_s ⇒ Object
15 16 17 |
# File 'lib/hostconnect/rtf_document.rb', line 15 def to_s @document.to_s end |