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/attr.rb | |
parent | 97ac172d58d695305c39d555155318edb99f1ea7 (diff) | |
download | ruby-b7528b5edb1f9148ea00ebb6151720e5943b3f0b.tar.gz |
* 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/attr.rb')
-rw-r--r-- | lib/rdoc/attr.rb | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/lib/rdoc/attr.rb b/lib/rdoc/attr.rb index f04fe168b1..5d9bc17831 100644 --- a/lib/rdoc/attr.rb +++ b/lib/rdoc/attr.rb @@ -6,7 +6,7 @@ require 'rdoc/method_attr' class RDoc::Attr < RDoc::MethodAttr - MARSHAL_VERSION = 1 # :nodoc: + MARSHAL_VERSION = 2 # :nodoc: ## # Is the attribute readable ('R'), writable ('W') or both ('RW')? @@ -92,6 +92,7 @@ class RDoc::Attr < RDoc::MethodAttr @visibility, parse(@comment), singleton, + @file.absolute_name, ] end @@ -103,6 +104,7 @@ class RDoc::Attr < RDoc::MethodAttr # * #parent_name def marshal_load array + version = array[0] @name = array[1] @full_name = array[2] @rw = array[3] @@ -110,9 +112,22 @@ class RDoc::Attr < RDoc::MethodAttr @comment = array[5] @singleton = array[6] || false # MARSHAL_VERSION == 0 + @file = RDoc::TopLevel.new array[7] if version > 1 + @parent_name = @full_name end + def pretty_print q # :nodoc: + q.group 2, "[#{self.class.name} #{full_name} #{rw} #{visibility}", "]" do + unless comment.empty? then + q.breakable + q.text "comment:" + q.breakable + q.pp @comment + end + end + end + def to_s # :nodoc: "#{definition} #{name} in: #{parent}" end |