diff options
author | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-06-16 04:59:24 +0000 |
---|---|---|
committer | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-06-16 04:59:24 +0000 |
commit | b7528b5edb1f9148ea00ebb6151720e5943b3f0b (patch) | |
tree | 4caf55c53adb188170240f54b924892fbc5f9814 /lib/rdoc/markup/formatter.rb | |
parent | 97ac172d58d695305c39d555155318edb99f1ea7 (diff) |
* lib/rdoc.rb: Import RDoc 3.7 release candidate
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32115 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rdoc/markup/formatter.rb')
-rw-r--r-- | lib/rdoc/markup/formatter.rb | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/lib/rdoc/markup/formatter.rb b/lib/rdoc/markup/formatter.rb index 9308954de1..b6e12f82e7 100644 --- a/lib/rdoc/markup/formatter.rb +++ b/lib/rdoc/markup/formatter.rb @@ -16,9 +16,10 @@ class RDoc::Markup::Formatter ## # Creates a new Formatter - def initialize - @markup = RDoc::Markup.new - @am = @markup.attribute_manager + def initialize markup = nil + @markup = markup || RDoc::Markup.new + @am = @markup.attribute_manager + @attr_tags = [] @in_tt = 0 @@ -26,6 +27,15 @@ class RDoc::Markup::Formatter end ## + # Adds +document+ to the output + + def accept_document document + document.parts.each do |item| + item.accept self + end + end + + ## # Add a new set of tags for an attribute. We allow separate start and end # tags for flexibility |