Class: Melbourne::AST::ConstAccess

Inherits:
Node
  • Object
show all
Defined in:
lib/melbourne/ast/constants.rb

Overview

Access of a constant as in:

X::Y # (X is the accessed constant)

Instance Attribute Summary collapse

Attributes inherited from Node

#line

Instance Method Summary collapse

Methods inherited from Node

#ascii_graph

Constructor Details

#initialize(line, parent, name) ⇒ ConstAccess

Returns a new instance of ConstAccess.



19
20
21
22
23
# File 'lib/melbourne/ast/constants.rb', line 19

def initialize(line, parent, name)
  @line = line
  @parent = parent
  @name = name
end

Instance Attribute Details

#nameObject

The name of the node



17
18
19
# File 'lib/melbourne/ast/constants.rb', line 17

def name
  @name
end

#parentObject

The parent node



13
14
15
# File 'lib/melbourne/ast/constants.rb', line 13

def parent
  @parent
end