Method: RTF::Document#initialize
- Defined in:
- lib/rtf/node.rb
#initialize(font, style = nil, character = CS_ANSI, language = LC_ENGLISH_UK) ⇒ Document
This is a constructor for the Document class.
Parameters
- font
-
The default font to be used by the document.
- style
-
The style settings to be applied to the document. This defaults to nil.
- character
-
The character set to be applied to the document. This defaults to Document::CS_ANSI.
- language
-
The language setting to be applied to document. This defaults to Document::LC_ENGLISH_UK.
1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 |
# File 'lib/rtf/node.rb', line 1651 def initialize(font, style=nil, character=CS_ANSI, language=LC_ENGLISH_UK) super(nil, '\rtf1') @fonts = FontTable.new(font) @lists = ListTable.new @default_font = 0 @colours = ColourTable.new @information = Information.new @character_set = character @language = language @style = style == nil ? DocumentStyle.new : style @headers = [nil, nil, nil, nil] = [nil, nil, nil, nil] @id = 0 end |