Class: Melbourne::AST::ScopedModuleName
- Inherits:
-
ModuleName
- Object
- Node
- ModuleName
- Melbourne::AST::ScopedModuleName
- Defined in:
- lib/melbourne/ast/definitions.rb
Overview
A scoped module name as in:
module X::M; end
Instance Attribute Summary collapse
-
#parent ⇒ Object
The parent of the scoped module name; for a module module X::M; end the scoped module name is
Yand the parent isX.
Attributes inherited from ModuleName
Attributes inherited from Node
Instance Method Summary collapse
-
#initialize(line, parent) ⇒ ScopedModuleName
constructor
A new instance of ScopedModuleName.
Methods inherited from Node
Constructor Details
#initialize(line, parent) ⇒ ScopedModuleName
Returns a new instance of ScopedModuleName.
448 449 450 451 452 |
# File 'lib/melbourne/ast/definitions.rb', line 448 def initialize(line, parent) @line = line @name = parent.name @parent = parent.parent end |
Instance Attribute Details
#parent ⇒ Object
The parent of the scoped module name; for a module module X::M; end the scoped module name is Y and the parent is X
446 447 448 |
# File 'lib/melbourne/ast/definitions.rb', line 446 def parent @parent end |