Class: RDoc::Markup::Paragraph
Overview
A Paragraph of text
Instance Attribute Summary
Attributes inherited from Raw
Instance Method Summary collapse
-
#accept(visitor) ⇒ Object
Calls #accept_paragraph on
visitor
. -
#text(hard_break = '') ⇒ Object
Joins the raw paragraph text and converts inline HardBreaks to the
hard_break
text.
Methods inherited from Raw
#<<, #==, #initialize, #merge, #pretty_print, #push
Constructor Details
This class inherits a constructor from RDoc::Markup::Raw
Instance Method Details
#accept(visitor) ⇒ Object
Calls #accept_paragraph on visitor
9 10 11 |
# File 'lib/rdoc/markup/paragraph.rb', line 9 def accept visitor visitor.accept_paragraph self end |
#text(hard_break = '') ⇒ Object
Joins the raw paragraph text and converts inline HardBreaks to the hard_break
text.
17 18 19 20 21 22 23 24 25 |
# File 'lib/rdoc/markup/paragraph.rb', line 17 def text hard_break = '' @parts.map do |part| if RDoc::Markup::HardBreak === part then hard_break else part end end.join end |