summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorzzak <zzak@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-05-20 02:52:29 +0000
committerzzak <zzak@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-05-20 02:52:29 +0000
commita3672d4bf4ddc5e39622e606df808b3954e18849 (patch)
tree39ee93f551ac5cbc8ddbbc24f228166cb947fc96 /lib
parent596cecb0579f8e04cafdc52e0bd1ea6f18de7715 (diff)
* lib/pp.rb: Revert part of r40834 and nodoc PP::ObjectMixin
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40850 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/pp.rb30
1 files changed, 1 insertions, 29 deletions
diff --git a/lib/pp.rb b/lib/pp.rb
index be8e389356..96e461a928 100644
--- a/lib/pp.rb
+++ b/lib/pp.rb
@@ -300,35 +300,7 @@ class PP < PrettyPrint
include PPMethods
end
- # Allows you to implement pretty print in your own class, for example:
- # require 'pp'
- #
- # class Cat
- # include PP::ObjectMixin
- #
- # attr_accessor :name, :age, :color
- #
- # def initialize name
- # @name = name
- # end
- #
- # def pretty_print q
- # q.pp_object self
- # end
- # alias inspect pretty_print_inspect
- #
- # end
- #
- # In order to use this class, try the following:
- #
- # ginger = Cat.new("ginger")
- # p ginger
- # #=> #<Cat:0x007f8dfb994900 @name="ginger">
- # ginger.age = 2
- # ginger.color = "red"
- # p ginger
- # #=> #<Cat:0x007f8dfb994900 @age=2, @color="red", @name="ginger">
- module ObjectMixin
+ module ObjectMixin # :nodoc:
# 1. specific pretty_print
# 2. specific inspect
# 3. generic pretty_print