Class: TRuby::IR::TypeAlias

Inherits:
Node
  • Object
show all
Defined in:
lib/t_ruby/ir.rb

Overview

Type alias declaration: type Name = Definition

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:, definition:, type_params: [], **opts) ⇒ TypeAlias

Returns a new instance of TypeAlias.



47
48
49
50
51
52
# File 'lib/t_ruby/ir.rb', line 47

def initialize(name:, definition:, type_params: [], **opts)
  super(**opts)
  @name = name
  @definition = definition
  @type_params = type_params
end

Instance Attribute Details

#definitionObject

Returns the value of attribute definition.



45
46
47
# File 'lib/t_ruby/ir.rb', line 45

def definition
  @definition
end

#nameObject

Returns the value of attribute name.



45
46
47
# File 'lib/t_ruby/ir.rb', line 45

def name
  @name
end

#type_paramsObject

Returns the value of attribute type_params.



45
46
47
# File 'lib/t_ruby/ir.rb', line 45

def type_params
  @type_params
end