Class: Decode::Language::Ruby::Singleton
- Inherits:
-
Definition
- Object
- Symbol
- Definition
- Decode::Language::Ruby::Singleton
- Defined in:
- lib/decode/language/ruby/class.rb
Overview
A Ruby-specific singleton class.
Instance Attribute Summary
Attributes inherited from Definition
Attributes inherited from Symbol
#kind, #language, #name, #parent
Instance Method Summary collapse
-
#container? ⇒ Boolean
A singleton class is a container for other definitions.
-
#nested? ⇒ Boolean
Typically, a singleton class does not contain other definitions.
-
#short_form ⇒ Object
(also: #long_form)
The short form of the class.
Methods inherited from Definition
#documentation, #initialize, #multiline?, #qualified_form, #text
Methods inherited from Symbol
#initialize, #inspect, #key, #lexical_path, #path, #qualified_name
Constructor Details
This class inherits a constructor from Decode::Definition
Instance Method Details
#container? ⇒ Boolean
A singleton class is a container for other definitions.
62 63 64 |
# File 'lib/decode/language/ruby/class.rb', line 62 def container? true end |
#nested? ⇒ Boolean
Typically, a singleton class does not contain other definitions.
68 69 70 |
# File 'lib/decode/language/ruby/class.rb', line 68 def nested? false end |
#short_form ⇒ Object Also known as: long_form
The short form of the class. e.g. ‘class << (self)`.
74 75 76 |
# File 'lib/decode/language/ruby/class.rb', line 74 def short_form "class << #{@name}" end |