diff options
Diffstat (limited to 'ruby_1_9_3/lib/rdoc/markup/indented_paragraph.rb')
-rw-r--r-- | ruby_1_9_3/lib/rdoc/markup/indented_paragraph.rb | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/ruby_1_9_3/lib/rdoc/markup/indented_paragraph.rb b/ruby_1_9_3/lib/rdoc/markup/indented_paragraph.rb new file mode 100644 index 0000000000..d995c7d8ed --- /dev/null +++ b/ruby_1_9_3/lib/rdoc/markup/indented_paragraph.rb @@ -0,0 +1,33 @@ +## +# An Indented Paragraph of text + +class RDoc::Markup::IndentedParagraph < RDoc::Markup::Raw + + ## + # The indent in number of spaces + + attr_reader :indent + + ## + # Creates a new IndentedParagraph containing +parts+ indented with +indent+ + # spaces + + def initialize indent, *parts + @indent = indent + + super(*parts) + end + + def == other # :nodoc: + super and indent == other.indent + end + + ## + # Calls #accept_indented_paragraph on +visitor+ + + def accept visitor + visitor.accept_indented_paragraph self + end + +end + |