Class: RTF::ParagraphNode
- Inherits:
-
CommandNode
- Object
- Node
- ContainerNode
- CommandNode
- RTF::ParagraphNode
- Defined in:
- lib/rtf/node.rb
Overview
This class represents a paragraph within an RTF document.
Instance Attribute Summary
Attributes inherited from CommandNode
#prefix, #split, #suffix, #wrap
Attributes inherited from ContainerNode
Attributes inherited from Node
Instance Method Summary collapse
-
#initialize(parent, style = nil) ⇒ ParagraphNode
constructor
A new instance of ParagraphNode.
Methods inherited from CommandNode
#<<, #apply, #background, #bold, #colour, #font, #footnote, #foreground, #image, #italic, #line_break, #link, #list, #paragraph, #strike, #subscript, #superscript, #table, #to_rtf, #underline
Methods inherited from ContainerNode
#[], #each, #first, #last, #size, #store, #to_rtf
Methods inherited from Node
#is_root?, #next_node, #previous_node, #root
Constructor Details
#initialize(parent, style = nil) ⇒ ParagraphNode
Returns a new instance of ParagraphNode.
595 596 597 598 599 600 |
# File 'lib/rtf/node.rb', line 595 def initialize(parent, style=nil) prefix = '\pard' prefix << style.prefix(nil, nil) if style super(parent, prefix, '\par') end |