Class: Melbourne::AST::ConstName

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

Overview

A constant’s name in a constant’s definition as in:

X = 42

Instance Attribute Summary collapse

Attributes inherited from Node

#line

Instance Method Summary collapse

Methods inherited from Node

#ascii_graph

Constructor Details

#initialize(line, name) ⇒ ConstName

Returns a new instance of ConstName.



119
120
121
122
# File 'lib/melbourne/ast/constants.rb', line 119

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

Instance Attribute Details

#nameObject

The name of the node



117
118
119
# File 'lib/melbourne/ast/constants.rb', line 117

def name
  @name
end