Class: Propolize::ParagraphChunk
- Inherits:
-
BlankTerminatedChunk
- Object
- LinesChunk
- BlankTerminatedChunk
- Propolize::ParagraphChunk
- Defined in:
- lib/propolize.rb
Overview
A paragraph chunk is a group of lines representing a paragraph (because it is not recognisable as anything else)
Instance Attribute Summary
Attributes inherited from LinesChunk
Instance Method Summary collapse
- #getDocumentComponent ⇒ Object
-
#postProcess ⇒ Object
Check if this paragraph is actually a heading, as determined by the 2nd line being an underline sequence.
- #to_s ⇒ Object
Methods inherited from BlankTerminatedChunk
#critiqueValue, #isTerminatedBy?
Methods inherited from LinesChunk
Constructor Details
This class inherits a constructor from Propolize::LinesChunk
Instance Method Details
#getDocumentComponent ⇒ Object
834 835 836 |
# File 'lib/propolize.rb', line 834 def getDocumentComponent return Paragraph.new(lines.join("\n"), :isCritique => @isCritique, :tag => @tag) end |
#postProcess ⇒ Object
Check if this paragraph is actually a heading, as determined by the 2nd line being an underline sequence
826 827 828 829 830 831 832 |
# File 'lib/propolize.rb', line 826 def postProcess if lines.length == 2 and lines[1].match(/^[-]+$/) then return HeadingChunk.new(lines[0]) else return self end end |
#to_s ⇒ Object
821 822 823 |
# File 'lib/propolize.rb', line 821 def to_s return "ParagraphChunk: #{critiqueValue}#{lines.inspect}" end |