Class: TRuby::IR::VariableRef
Overview
Variable reference
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#scope ⇒ Object
Returns the value of attribute scope.
Attributes inherited from Node
#location, #metadata, #type_info
Instance Method Summary collapse
-
#initialize(name:, scope: :local, **opts) ⇒ VariableRef
constructor
scope: :local, :instance, :class, :global.
Methods inherited from Node
#accept, #children, #transform
Constructor Details
#initialize(name:, scope: :local, **opts) ⇒ VariableRef
scope: :local, :instance, :class, :global
185 186 187 188 189 |
# File 'lib/t_ruby/ir.rb', line 185 def initialize(name:, scope: :local, **opts) super(**opts) @name = name @scope = scope end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
182 183 184 |
# File 'lib/t_ruby/ir.rb', line 182 def name @name end |
#scope ⇒ Object
Returns the value of attribute scope.
182 183 184 |
# File 'lib/t_ruby/ir.rb', line 182 def scope @scope end |