Class: TRuby::IR::SimpleType

Inherits:
TypeNode show all
Defined in:
lib/t_ruby/ir.rb

Overview

Simple type (String, Integer, etc.)

Instance Attribute Summary collapse

Attributes inherited from Node

#location, #metadata, #type_info

Instance Method Summary collapse

Methods inherited from Node

#accept, #children, #transform

Constructor Details

#initialize(name:, **opts) ⇒ SimpleType

Returns a new instance of SimpleType.



531
532
533
534
# File 'lib/t_ruby/ir.rb', line 531

def initialize(name:, **opts)
  super(**opts)
  @name = name
end

Instance Attribute Details

#nameObject

Returns the value of attribute name.



529
530
531
# File 'lib/t_ruby/ir.rb', line 529

def name
  @name
end

Instance Method Details

#to_rbsObject



536
537
538
# File 'lib/t_ruby/ir.rb', line 536

def to_rbs
  @name
end

#to_trbObject



540
541
542
# File 'lib/t_ruby/ir.rb', line 540

def to_trb
  @name
end