Class: RDoc::Markup::IndentedParagraph

Inherits:
Raw
  • Object
show all
Defined in:
lib/rdoc/markup/indented_paragraph.rb

Overview

An Indented Paragraph of text

Instance Attribute Summary collapse

Attributes inherited from Raw

#parts

Instance Method Summary collapse

Methods inherited from Raw

#<<, #merge, #pretty_print, #push, #text

Constructor Details

#initialize(indent, *parts) ⇒ IndentedParagraph

Creates a new IndentedParagraph containing parts indented with indent spaces



15
16
17
18
19
# File 'lib/rdoc/markup/indented_paragraph.rb', line 15

def initialize indent, *parts
  @indent = indent

  super(*parts)
end

Instance Attribute Details

#indentObject (readonly)

The indent in number of spaces



9
10
11
# File 'lib/rdoc/markup/indented_paragraph.rb', line 9

def indent
  @indent
end

Instance Method Details

#==(other) ⇒ Object

:nodoc:



21
22
23
# File 'lib/rdoc/markup/indented_paragraph.rb', line 21

def == other # :nodoc:
  super and indent == other.indent
end

#accept(visitor) ⇒ Object

Calls #accept_indented_paragraph on visitor



28
29
30
# File 'lib/rdoc/markup/indented_paragraph.rb', line 28

def accept visitor
  visitor.accept_indented_paragraph self
end