Class: TRuby::IR::InstanceVariable
Overview
Instance variable declaration
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#type_annotation ⇒ Object
Returns the value of attribute type_annotation.
Attributes inherited from Node
#location, #metadata, #type_info
Instance Method Summary collapse
-
#initialize(name:, type_annotation: nil, **opts) ⇒ InstanceVariable
constructor
A new instance of InstanceVariable.
Methods inherited from Node
#accept, #children, #transform
Constructor Details
#initialize(name:, type_annotation: nil, **opts) ⇒ InstanceVariable
Returns a new instance of InstanceVariable.
107 108 109 110 111 |
# File 'lib/t_ruby/ir.rb', line 107 def initialize(name:, type_annotation: nil, **opts) super(**opts) @name = name @type_annotation = type_annotation end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
105 106 107 |
# File 'lib/t_ruby/ir.rb', line 105 def name @name end |
#type_annotation ⇒ Object
Returns the value of attribute type_annotation.
105 106 107 |
# File 'lib/t_ruby/ir.rb', line 105 def type_annotation @type_annotation end |