Class: Duby::AST::TypeDefinition

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

Constant Summary

Constants inherited from TypeReference

Duby::AST::TypeReference::BlockType, 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

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

Methods included from Named

#to_s

Methods inherited from Node

#<<, ===, #[], #_set_parent, child, child_name, #each, #empty?, #expr?, #initialize_copy, #insert, #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.



498
499
500
501
502
503
# File 'lib/duby/ast.rb', line 498

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

  @superclass = superclass
  @interfaces = interfaces
end

Instance Attribute Details

#interfacesObject

Returns the value of attribute interfaces.



496
497
498
# File 'lib/duby/ast.rb', line 496

def interfaces
  @interfaces
end

#superclassObject

Returns the value of attribute superclass.



496
497
498
# File 'lib/duby/ast.rb', line 496

def superclass
  @superclass
end