Class: RRTF::ParagraphNode
- Inherits:
-
CommandNode
- Object
- Node
- ContainerNode
- CommandNode
- RRTF::ParagraphNode
- Defined in:
- lib/rrtf/node/paragraph_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, #footnote, #geometry, #image, #line_break, #link, #list, #paragraph, #table, #to_rtf
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
4 5 6 7 8 9 |
# File 'lib/rrtf/node/paragraph_node.rb', line 4 def initialize(parent, style=nil) prefix = '\pard' prefix << style.prefix(parent.root) if style super(parent, prefix, '\par') end |