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
#The comment lines which directly preceeded the definition., #The language the symbol is defined within., #The path to the definition, relative to the parent., #The source file containing this definition., #comments, #language, #parent, #path, #source, #visibility
Instance Method Summary collapse
-
#container? ⇒ Boolean
A module is a container for other definitions.
-
#long_form ⇒ Object
Generate a long form representation of the module.
-
#qualified_form ⇒ Object
The fully qualified name of the module.
-
#short_form ⇒ Object
The short form of the module.
Methods inherited from Definition
#:public, :private, :protected=, #The parent definition, defining lexical scope.=, #The symbol name e.g. `:Decode`.=, #convert, #coverage_relevant?, #documentation, #documented?, #full_path, #initialize, #inspect, #location, #multiline?, #name, #nested?, #nested_name, #public?, #qualified_name, #start_with?, #text
Constructor Details
This class inherits a constructor from Decode::Definition
Instance Method Details
#container? ⇒ Boolean
A module is a container for other definitions.
14 15 16 |
# File 'lib/decode/language/ruby/module.rb', line 14 def container? true end |
#long_form ⇒ Object
Generate a long form representation of the module.
25 26 27 |
# File 'lib/decode/language/ruby/module.rb', line 25 def long_form qualified_form end |
#qualified_form ⇒ Object
The fully qualified name of the module. e.g. ‘module ::Barnyard::Dog`.
31 32 33 |
# File 'lib/decode/language/ruby/module.rb', line 31 def qualified_form "module #{self.qualified_name}" end |
#short_form ⇒ Object
The short form of the module. e.g. ‘module Barnyard`.
20 21 22 |
# File 'lib/decode/language/ruby/module.rb', line 20 def short_form "module #{self.name}" end |