aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rdoc/markup/paragraph.rb
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-04-27 03:45:22 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-04-27 03:45:22 +0000
commit336a8301f725bd8fbf5f1e0c4fee162382a76d0f (patch)
tree455c5fb8689d09e734a9ca13cdbe3ef9a7651a6e /lib/rdoc/markup/paragraph.rb
parent3a87c3c5603fce8449f78faccaff5f4be6f372e1 (diff)
downloadruby-336a8301f725bd8fbf5f1e0c4fee162382a76d0f.tar.gz
Import RDoc 2.5.7. Fixes #1318 and ruby-core:29780
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27509 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rdoc/markup/paragraph.rb')
-rw-r--r--lib/rdoc/markup/paragraph.rb57
1 files changed, 1 insertions, 56 deletions
diff --git a/lib/rdoc/markup/paragraph.rb b/lib/rdoc/markup/paragraph.rb
index bc23423dfc..a9923ed24d 100644
--- a/lib/rdoc/markup/paragraph.rb
+++ b/lib/rdoc/markup/paragraph.rb
@@ -1,66 +1,11 @@
##
# A Paragraph of text
-class RDoc::Markup::Paragraph
-
- ##
- # The component parts of the list
-
- attr_reader :parts
-
- ##
- # Creates a new Paragraph containing +parts+
-
- def initialize *parts
- @parts = []
- @parts.push(*parts)
- end
-
- ##
- # Appends +text+ to the Paragraph
-
- def << text
- @parts << text
- end
-
- def == other # :nodoc:
- self.class == other.class and text == other.text
- end
+class RDoc::Markup::Paragraph < RDoc::Markup::Raw
def accept visitor
visitor.accept_paragraph self
end
- ##
- # Appends +other+'s parts into this Paragraph
-
- def merge other
- @parts.push(*other.parts)
- end
-
- def pretty_print q # :nodoc:
- self.class.name =~ /.*::(\w{4})/i
-
- q.group 2, "[#{$1.downcase}: ", ']' do
- q.seplist @parts do |part|
- q.pp part
- end
- end
- end
-
- ##
- # Appends +texts+ onto this Paragraph
-
- def push *texts
- self.parts.push(*texts)
- end
-
- ##
- # The text of this paragraph
-
- def text
- @parts.join ' '
- end
-
end