Class: TRuby::IR::NullableType
- Defined in:
- lib/t_ruby/ir.rb
Overview
Nullable type (String?)
Instance Attribute Summary collapse
-
#inner_type ⇒ Object
Returns the value of attribute inner_type.
Attributes inherited from Node
#location, #metadata, #type_info
Instance Method Summary collapse
-
#initialize(inner_type:, **opts) ⇒ NullableType
constructor
A new instance of NullableType.
- #to_rbs ⇒ Object
- #to_trb ⇒ Object
Methods inherited from Node
#accept, #children, #transform
Constructor Details
#initialize(inner_type:, **opts) ⇒ NullableType
Returns a new instance of NullableType.
613 614 615 616 |
# File 'lib/t_ruby/ir.rb', line 613 def initialize(inner_type:, **opts) super(**opts) @inner_type = inner_type end |
Instance Attribute Details
#inner_type ⇒ Object
Returns the value of attribute inner_type.
611 612 613 |
# File 'lib/t_ruby/ir.rb', line 611 def inner_type @inner_type end |
Instance Method Details
#to_rbs ⇒ Object
618 619 620 |
# File 'lib/t_ruby/ir.rb', line 618 def to_rbs "#{@inner_type.to_rbs}?" end |
#to_trb ⇒ Object
622 623 624 |
# File 'lib/t_ruby/ir.rb', line 622 def to_trb "#{@inner_type.to_trb}?" end |