Class: TRuby::IR::Assignment
Overview
Variable assignment
Instance Attribute Summary collapse
-
#target ⇒ Object
Returns the value of attribute target.
-
#type_annotation ⇒ Object
Returns the value of attribute type_annotation.
-
#value ⇒ Object
Returns the value of attribute value.
Attributes inherited from Node
#location, #metadata, #type_info
Instance Method Summary collapse
- #children ⇒ Object
-
#initialize(target:, value:, type_annotation: nil, **opts) ⇒ Assignment
constructor
A new instance of Assignment.
Methods inherited from Node
Constructor Details
#initialize(target:, value:, type_annotation: nil, **opts) ⇒ Assignment
Returns a new instance of Assignment.
184 185 186 187 188 189 |
# File 'lib/t_ruby/ir.rb', line 184 def initialize(target:, value:, type_annotation: nil, **opts) super(**opts) @target = target @value = value @type_annotation = type_annotation end |
Instance Attribute Details
#target ⇒ Object
Returns the value of attribute target.
182 183 184 |
# File 'lib/t_ruby/ir.rb', line 182 def target @target end |
#type_annotation ⇒ Object
Returns the value of attribute type_annotation.
182 183 184 |
# File 'lib/t_ruby/ir.rb', line 182 def type_annotation @type_annotation end |
#value ⇒ Object
Returns the value of attribute value.
182 183 184 |
# File 'lib/t_ruby/ir.rb', line 182 def value @value end |
Instance Method Details
#children ⇒ Object
191 192 193 |
# File 'lib/t_ruby/ir.rb', line 191 def children [@value] end |