Class: Melbourne::AST::ScopedClassName
- Defined in:
- lib/melbourne/ast/definitions.rb
Overview
A scoped class name as in:
class X::Y; end
Instance Attribute Summary collapse
-
#parent ⇒ Object
The parent of the scoped class name; for a class class X::Y; end the scoped class name is
Yand the parent isX.
Attributes inherited from ClassName
Attributes inherited from Node
Instance Method Summary collapse
-
#initialize(line, parent, superclass) ⇒ ScopedClassName
constructor
A new instance of ScopedClassName.
Methods inherited from Node
Constructor Details
#initialize(line, parent, superclass) ⇒ ScopedClassName
Returns a new instance of ScopedClassName.
374 375 376 377 378 379 |
# File 'lib/melbourne/ast/definitions.rb', line 374 def initialize(line, parent, superclass) @line = line @name = parent.name @parent = parent.parent @superclass = superclass end |
Instance Attribute Details
#parent ⇒ Object
The parent of the scoped class name; for a class class X::Y; end the scoped class name is Y and the parent is X
372 373 374 |
# File 'lib/melbourne/ast/definitions.rb', line 372 def parent @parent end |