Class: Rubinius::AST::ScopedConstant
- Defined in:
- lib/compiler/ast/constants.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#parent ⇒ Object
Returns the value of attribute parent.
Attributes inherited from Node
Instance Method Summary collapse
-
#initialize(line, parent, name) ⇒ ScopedConstant
constructor
A new instance of ScopedConstant.
- #to_sexp ⇒ Object (also: #assign_sexp)
Methods inherited from Node
#ascii_graph, #attributes, #children, match_arguments?, match_send?, #new_block_generator, #new_generator, #node_name, node_name, #pos, #set_child, transform, #transform, transform_comment, transform_kind, transform_kind=, transform_name, #visit, #walk
Constructor Details
#initialize(line, parent, name) ⇒ ScopedConstant
Returns a new instance of ScopedConstant.
15 16 17 18 19 |
# File 'lib/compiler/ast/constants.rb', line 15 def initialize(line, parent, name) @line = line @parent = parent @name = name end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
13 14 15 |
# File 'lib/compiler/ast/constants.rb', line 13 def name @name end |
#parent ⇒ Object
Returns the value of attribute parent.
13 14 15 |
# File 'lib/compiler/ast/constants.rb', line 13 def parent @parent end |
Instance Method Details
#to_sexp ⇒ Object Also known as: assign_sexp
21 22 23 |
# File 'lib/compiler/ast/constants.rb', line 21 def to_sexp [:colon2, @parent.to_sexp, @name] end |