summaryrefslogtreecommitdiff
path: root/ruby_1_9_3/lib/rdoc/single_class.rb
diff options
context:
space:
mode:
Diffstat (limited to 'ruby_1_9_3/lib/rdoc/single_class.rb')
-rw-r--r--ruby_1_9_3/lib/rdoc/single_class.rb23
1 files changed, 23 insertions, 0 deletions
diff --git a/ruby_1_9_3/lib/rdoc/single_class.rb b/ruby_1_9_3/lib/rdoc/single_class.rb
new file mode 100644
index 0000000000..e48758d9c8
--- /dev/null
+++ b/ruby_1_9_3/lib/rdoc/single_class.rb
@@ -0,0 +1,23 @@
+require 'rdoc/class_module'
+
+##
+# A singleton class
+
+class RDoc::SingleClass < RDoc::ClassModule
+
+ ##
+ # Adds the superclass to the included modules.
+
+ def ancestors
+ superclass ? super + [superclass] : super
+ end
+
+ ##
+ # The definition of this singleton class, <tt>class << MyClassName</tt>
+
+ def definition
+ "class << #{full_name}"
+ end
+
+end
+