Class: RubyRTF::Document
- Inherits:
-
Object
- Object
- RubyRTF::Document
- Defined in:
- lib/ruby-rtf/document.rb
Overview
Represents the entire RTF document
Instance Attribute Summary collapse
-
#character_set ⇒ String
The characgter set for the document (:ansi, :pc, :pca, :mac).
-
#colour_table ⇒ Array
(also: #color_table)
readonly
The colour table.
-
#default_font ⇒ Integer
The default font number for the document.
-
#font_table ⇒ Array
readonly
The font table.
-
#sections ⇒ Array
readonly
The different formatted sections of the document.
Instance Method Summary collapse
- #<<(obj) ⇒ Object
-
#initialize ⇒ RubyRTF::Document
constructor
Creates a new document.
Constructor Details
#initialize ⇒ RubyRTF::Document
Creates a new document
23 24 25 26 27 28 29 30 |
# File 'lib/ruby-rtf/document.rb', line 23 def initialize @font_table = [] @colour_table = [] @character_set = :ansi @default_font = 0 @sections = [] end |
Instance Attribute Details
#character_set ⇒ String
Returns The characgter set for the document (:ansi, :pc, :pca, :mac).
15 16 17 |
# File 'lib/ruby-rtf/document.rb', line 15 def character_set @character_set end |
#colour_table ⇒ Array (readonly) Also known as: color_table
Returns The colour table.
8 9 10 |
# File 'lib/ruby-rtf/document.rb', line 8 def colour_table @colour_table end |
#default_font ⇒ Integer
Returns The default font number for the document.
12 13 14 |
# File 'lib/ruby-rtf/document.rb', line 12 def default_font @default_font end |
#font_table ⇒ Array (readonly)
Returns The font table.
5 6 7 |
# File 'lib/ruby-rtf/document.rb', line 5 def font_table @font_table end |
#sections ⇒ Array (readonly)
Returns The different formatted sections of the document.
18 19 20 |
# File 'lib/ruby-rtf/document.rb', line 18 def sections @sections end |
Instance Method Details
#<<(obj) ⇒ Object
32 33 34 |
# File 'lib/ruby-rtf/document.rb', line 32 def <<(obj) @sections << obj end |