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