Class: RDoc::Markup::Paragraph
- Inherits:
-
Markup::Raw
- Object
- Markup::Raw
- RDoc::Markup::Paragraph
- Defined in:
- lib/rdoc/markup/paragraph.rb
Overview
A Paragraph of text
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_breaktext.
Instance Method Details
#accept(visitor) ⇒ Object
Calls #accept_paragraph on visitor
12 13 14 |
# File 'lib/rdoc/markup/paragraph.rb', line 12 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.
20 21 22 23 24 25 26 27 28 |
# File 'lib/rdoc/markup/paragraph.rb', line 20 def text(hard_break = '') @parts.map do |part| if Markup::HardBreak === part hard_break else part end end.join end |