Class: TRuby::IR::TupleType
Overview
Tuple type ([String, Integer, Boolean])
Instance Attribute Summary collapse
-
#element_types ⇒ Object
Returns the value of attribute element_types.
Attributes inherited from Node
#location, #metadata, #type_info
Instance Method Summary collapse
-
#initialize(element_types: [], **opts) ⇒ TupleType
constructor
A new instance of TupleType.
- #to_rbs ⇒ Object
- #to_trb ⇒ Object
Methods inherited from Node
#accept, #children, #transform
Constructor Details
#initialize(element_types: [], **opts) ⇒ TupleType
Returns a new instance of TupleType.
595 596 597 598 |
# File 'lib/t_ruby/ir.rb', line 595 def initialize(element_types: [], **opts) super(**opts) @element_types = element_types end |
Instance Attribute Details
#element_types ⇒ Object
Returns the value of attribute element_types.
593 594 595 |
# File 'lib/t_ruby/ir.rb', line 593 def element_types @element_types end |
Instance Method Details
#to_rbs ⇒ Object
600 601 602 |
# File 'lib/t_ruby/ir.rb', line 600 def to_rbs "[#{@element_types.map(&:to_rbs).join(', ')}]" end |
#to_trb ⇒ Object
604 605 606 |
# File 'lib/t_ruby/ir.rb', line 604 def to_trb "[#{@element_types.map(&:to_trb).join(', ')}]" end |