2015-12-16 00:07:31 -05:00
|
|
|
# frozen_string_literal: false
|
2010-04-01 03:45:16 -04:00
|
|
|
##
|
|
|
|
# A singleton class
|
|
|
|
|
|
|
|
class RDoc::SingleClass < RDoc::ClassModule
|
|
|
|
|
2011-02-01 19:32:30 -05:00
|
|
|
##
|
2010-12-19 22:22:49 -05:00
|
|
|
# Adds the superclass to the included modules.
|
2011-02-01 19:32:30 -05:00
|
|
|
|
2010-04-01 03:45:16 -04:00
|
|
|
def ancestors
|
2010-12-19 22:22:49 -05:00
|
|
|
superclass ? super + [superclass] : super
|
2010-04-01 03:45:16 -04:00
|
|
|
end
|
|
|
|
|
2014-12-06 20:22:37 -05:00
|
|
|
def aref_prefix # :nodoc:
|
|
|
|
'sclass'
|
|
|
|
end
|
|
|
|
|
2011-02-01 19:32:30 -05:00
|
|
|
##
|
|
|
|
# The definition of this singleton class, <tt>class << MyClassName</tt>
|
|
|
|
|
|
|
|
def definition
|
|
|
|
"class << #{full_name}"
|
|
|
|
end
|
|
|
|
|
2010-04-01 03:45:16 -04:00
|
|
|
end
|
|
|
|
|