Class: Rubinius::AST::ToplevelConstant
- Defined in:
- lib/compiler/ast/constants.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
Attributes inherited from Node
Instance Method Summary collapse
-
#initialize(line, name) ⇒ ToplevelConstant
constructor
A new instance of ToplevelConstant.
- #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, name) ⇒ ToplevelConstant
Returns a new instance of ToplevelConstant.
31 32 33 34 |
# File 'lib/compiler/ast/constants.rb', line 31 def initialize(line, name) @line = line @name = name end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
29 30 31 |
# File 'lib/compiler/ast/constants.rb', line 29 def name @name end |
Instance Method Details
#to_sexp ⇒ Object Also known as: assign_sexp
36 37 38 |
# File 'lib/compiler/ast/constants.rb', line 36 def to_sexp [:colon3, @name] end |