2015-06-20 22:49:30 +02:00
|
|
|
module Virtual
|
|
|
|
|
|
|
|
# Self (the receiver of the current message) is a Slot in the Message.
|
|
|
|
# The current self in the current message and if the current message
|
|
|
|
# want to send a message it puts the new self into the next_message.
|
|
|
|
#
|
|
|
|
# The slot in the Message is represented by instances of class Self
|
2015-06-29 19:55:45 +02:00
|
|
|
# (and slots in the next_message by instances of NewSelf)
|
2015-06-20 22:49:30 +02:00
|
|
|
#
|
2015-09-27 11:59:26 +02:00
|
|
|
# Additionally the current Self is represented as it's own top-level object.
|
2015-10-07 09:04:00 +02:00
|
|
|
# If self is an Object one can refer to it's instance variables as Slots in SelfsSlot
|
2015-06-20 22:49:30 +02:00
|
|
|
#
|
2015-10-07 09:04:00 +02:00
|
|
|
# In Summary: class Self represents the self object and SelfsSlot instances variables of
|
2015-06-20 22:49:30 +02:00
|
|
|
# that object
|
|
|
|
#
|
2015-10-07 09:04:00 +02:00
|
|
|
class SelfsSlot < Slot
|
2015-09-27 11:59:26 +02:00
|
|
|
def initialize index , type , value = nil
|
|
|
|
@index = index
|
|
|
|
super( type , value )
|
2015-06-20 22:49:30 +02:00
|
|
|
end
|
2015-09-27 11:59:26 +02:00
|
|
|
attr_reader :index
|
2015-06-30 08:39:45 +02:00
|
|
|
def object_name
|
|
|
|
:self
|
|
|
|
end
|
2015-06-20 22:49:30 +02:00
|
|
|
end
|
|
|
|
end
|