Class: Decode::Language::Ruby::Singleton
- Inherits:
-
Definition
- Object
- 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
#comments, #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
#convert, #documentation, #initialize, #multiline?, #nested_name, #path, #qualified_form, #qualified_name, #start_with?, #text, #to_s
Constructor Details
This class inherits a constructor from Decode::Definition
Instance Method Details
#container? ⇒ Boolean
A singleton class is a container for other definitions.
66 67 68 |
# File 'lib/decode/language/ruby/class.rb', line 66 def container? true end |
#nested? ⇒ Boolean
Typically, a singleton class does not contain other definitions.
72 73 74 |
# File 'lib/decode/language/ruby/class.rb', line 72 def nested? false end |
#short_form ⇒ Object Also known as: long_form
The short form of the class. e.g. ‘class << (self)`.
78 79 80 |
# File 'lib/decode/language/ruby/class.rb', line 78 def short_form "class << #{@name}" end |