Class: TRuby::IR::Interface

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

Overview

Interface declaration

Instance Attribute Summary collapse

Attributes inherited from Node

#location, #metadata, #type_info

Instance Method Summary collapse

Methods inherited from Node

#accept, #transform

Constructor Details

#initialize(name:, members: [], extends: [], type_params: [], **opts) ⇒ Interface

Returns a new instance of Interface.



59
60
61
62
63
64
65
# File 'lib/t_ruby/ir.rb', line 59

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

Instance Attribute Details

#extendsObject

Returns the value of attribute extends.



57
58
59
# File 'lib/t_ruby/ir.rb', line 57

def extends
  @extends
end

#membersObject

Returns the value of attribute members.



57
58
59
# File 'lib/t_ruby/ir.rb', line 57

def members
  @members
end

#nameObject

Returns the value of attribute name.



57
58
59
# File 'lib/t_ruby/ir.rb', line 57

def name
  @name
end

#type_paramsObject

Returns the value of attribute type_params.



57
58
59
# File 'lib/t_ruby/ir.rb', line 57

def type_params
  @type_params
end

Instance Method Details

#childrenObject



67
68
69
# File 'lib/t_ruby/ir.rb', line 67

def children
  @members
end