Class: Duby::AST::TypeDefinition

Inherits:
TypeReference show all
Defined in:
lib/duby/ast.rb

Constant Summary

Constants inherited from TypeReference

Duby::AST::TypeReference::ErrorType, Duby::AST::TypeReference::NoType, Duby::AST::TypeReference::NullType, Duby::AST::TypeReference::UnreachableType

Instance Attribute Summary collapse

Attributes inherited from TypeReference

#array, #meta

Attributes included from Named

#name

Attributes inherited from Node

#children, #inferred_type, #newline, #parent, #position

Instance Method Summary collapse

Methods inherited from TypeReference

#==, #compatible?, #component_type, #eql?, #error?, #hash, #is_parent, #iterable?, #meta?, #narrow, #primitive?, #to_s, #unmeta, #unreachable?

Methods included from Named

#to_s

Methods inherited from Node

#[], #each, #expr?, #inspect, #line_number, #log, #precompile, #resolve_if, #resolved!, #resolved?, #simple_name, #temp, #to_s

Constructor Details

#initialize(name, superclass, interfaces) ⇒ TypeDefinition

Returns a new instance of TypeDefinition.



259
260
261
262
263
264
# File 'lib/duby/ast.rb', line 259

def initialize(name, superclass, interfaces)
  super(name, false)

  @superclass = superclass
  @interfaces = interfaces
end

Instance Attribute Details

#interfacesObject

Returns the value of attribute interfaces.



257
258
259
# File 'lib/duby/ast.rb', line 257

def interfaces
  @interfaces
end

#superclassObject

Returns the value of attribute superclass.



257
258
259
# File 'lib/duby/ast.rb', line 257

def superclass
  @superclass
end