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
201 202 203 204 205 |
# File 'lib/t_ruby/ir.rb', line 201 def initialize(name:, scope: :local, **opts) super(**opts) @name = name @scope = scope end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
198 199 200 |
# File 'lib/t_ruby/ir.rb', line 198 def name @name end |
#scope ⇒ Object
Returns the value of attribute scope.
198 199 200 |
# File 'lib/t_ruby/ir.rb', line 198 def scope @scope end |