class RDoc::Markup::IndentedParagraph
An Indented Paragraph of text
Attributes
The indent in number of spaces
: Integer
Public Class Methods
Source
# File lib/rdoc/markup/indented_paragraph.rb, line 13 def initialize(indent, *parts) @indent = indent super(*parts) end
Creates a new IndentedParagraph containing +parts+ indented with +indent+ spaces
: (Integer, *String) -> void
Calls superclass method
Public Instance Methods
Source
# File lib/rdoc/markup/indented_paragraph.rb, line 27 def accept(visitor) visitor.accept_indented_paragraph(self) end
Calls #accept_indented_paragraph on +visitor+ @override
: (untyped) -> void
Source
# File lib/rdoc/markup/indented_paragraph.rb, line 33 def text(hard_break = nil) @parts.map do |part| if HardBreak === part then '%1$s%3$*2$s' % [hard_break, @indent, ' '] if hard_break else part end end.join end
Joins the raw paragraph text and converts inline HardBreaks to the +hard_break+ text followed by the indent.
: (?String) -> String