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.
625 626 627 628 |
# File 'lib/t_ruby/ir.rb', line 625 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.
623 624 625 |
# File 'lib/t_ruby/ir.rb', line 623 def element_types @element_types end |
Instance Method Details
#to_rbs ⇒ Object
630 631 632 |
# File 'lib/t_ruby/ir.rb', line 630 def to_rbs "[#{@element_types.map(&:to_rbs).join(", ")}]" end |
#to_trb ⇒ Object
634 635 636 |
# File 'lib/t_ruby/ir.rb', line 634 def to_trb "[#{@element_types.map(&:to_trb).join(", ")}]" end |