Class: Melbourne::AST::ConstAtTop
- Defined in:
- lib/melbourne/ast/constants.rb
Overview
A constant in the top level as in:
::X
Instance Attribute Summary collapse
-
#name ⇒ Object
The name of the node.
-
#parent ⇒ Object
The parent node.
Attributes inherited from Node
Instance Method Summary collapse
-
#initialize(line, name) ⇒ ConstAtTop
constructor
A new instance of ConstAtTop.
Methods inherited from Node
Constructor Details
#initialize(line, name) ⇒ ConstAtTop
Returns a new instance of ConstAtTop.
41 42 43 44 45 |
# File 'lib/melbourne/ast/constants.rb', line 41 def initialize(line, name) @line = line @name = name @parent = TopLevel.new line end |
Instance Attribute Details
#name ⇒ Object
The name of the node
39 40 41 |
# File 'lib/melbourne/ast/constants.rb', line 39 def name @name end |
#parent ⇒ Object
The parent node
35 36 37 |
# File 'lib/melbourne/ast/constants.rb', line 35 def parent @parent end |