Class: Decode::Language::Ruby::Module
- Inherits:
-
Definition
- Object
- Definition
- Decode::Language::Ruby::Module
- Defined in:
- lib/decode/language/ruby/module.rb
Overview
A Ruby-specific module.
Instance Attribute Summary
Attributes inherited from Definition
#comments, #language, #name, #parent
Instance Method Summary collapse
-
#container? ⇒ Boolean
A module is a container for other definitions.
- #nested_name ⇒ Object
-
#qualified_form ⇒ Object
The fully qualified name of the class.
-
#short_form ⇒ Object
(also: #long_form)
The short form of the module.
Methods inherited from Definition
#convert, #documentation, #initialize, #multiline?, #nested?, #path, #qualified_name, #start_with?, #text, #to_s
Constructor Details
This class inherits a constructor from Decode::Definition
Instance Method Details
#container? ⇒ Boolean
A module is a container for other definitions.
29 30 31 |
# File 'lib/decode/language/ruby/module.rb', line 29 def container? true end |
#nested_name ⇒ Object
33 34 35 |
# File 'lib/decode/language/ruby/module.rb', line 33 def nested_name "::#{name}" end |
#qualified_form ⇒ Object
The fully qualified name of the class. e.g. ‘module ::Barnyard::Dog`.
48 49 50 |
# File 'lib/decode/language/ruby/module.rb', line 48 def qualified_form "module #{self.qualified_name}" end |
#short_form ⇒ Object Also known as: long_form
The short form of the module. e.g. ‘module Barnyard`.
39 40 41 |
# File 'lib/decode/language/ruby/module.rb', line 39 def short_form "module #{@name}" end |