class Singleton < Definition
- Inherits from
Definition: #public?, #protected?, #private?, #multiline?, #text, #location, #inspect, #name, #full_path, #documented?, #qualified_name, #start_with?, #convert, #long_form, #qualified_form, #alias?, #documentation
A Ruby-specific singleton class.
Definitions
def nested_name
Generate a nested name for the singleton class.
Implementation
def nested_name
"class"
end
def container?
A singleton class is a container for other definitions.
Signature
-
returns
bool
Implementation
def container?
true
end
def nested?
Typically, a singleton class does not contain other definitions.
Signature
-
returns
bool
Implementation
def nested?
false
end
def short_form
The short form of the class.
e.g. class << self.
Implementation
def short_form
"class << #{self.name}"
end
alias long_form short_form
The long form is the same as the short form.
def coverage_relevant?
Coverage is not relevant for singleton classes.
Implementation
def coverage_relevant?
false
end