Class: RubyBreaker::TypeDefs::SelfType
- Inherits:
-
NominalType
- Object
- Type
- NominalType
- RubyBreaker::TypeDefs::SelfType
- Defined in:
- lib/rubybreaker/type/type.rb
Overview
This type represents the self type. Note that this is a subclass of Nominal Type. It works just like nominal type except that it also points to the current object! See subtyping.rb for more detail on how this would impact typing.
Instance Attribute Summary
Attributes inherited from NominalType
Attributes inherited from Type
Class Method Summary collapse
-
.get_self(mod) ⇒ Object
This is a getter method for class variable mod.
-
.set_self(mod) ⇒ Object
This is a setter method for class variable mod.
Instance Method Summary collapse
-
#initialize(*args) ⇒ SelfType
constructor
A new instance of SelfType.
Methods inherited from Type
Constructor Details
#initialize(*args) ⇒ SelfType
Returns a new instance of SelfType.
109 110 111 112 |
# File 'lib/rubybreaker/type/type.rb', line 109 def initialize(*args) # NOTE: @@mod is not required in general, but for typing it is a must. super(@@mod, *args) end |
Class Method Details
.get_self(mod) ⇒ Object
This is a getter method for class variable mod.
105 106 107 |
# File 'lib/rubybreaker/type/type.rb', line 105 def self.get_self(mod) @@mod = mod end |
.set_self(mod) ⇒ Object
This is a setter method for class variable mod. NOTE: It is set every time typesig() is called
100 101 102 |
# File 'lib/rubybreaker/type/type.rb', line 100 def self.set_self(mod) @@mod = mod end |