Class: Universe

Inherits:
Object
  • Object
show all
Defined in:
lib/atome/kernel/universe.rb

Overview

all created atomes are listed here

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.atomesObject (readonly)

Returns the value of attribute atomes.



24
25
26
# File 'lib/atome/kernel/universe.rb', line 24

def atomes
  @atomes
end

Class Method Details

.app_identityObject



5
6
7
8
9
10
11
# File 'lib/atome/kernel/universe.rb', line 5

def self.app_identity
  # each app hav its own identity, this allow to generate new user identities from th
  @app_identity = 3
  # the identity is define as follow : parentCreatorID_softwareInstanceID_objetID
  # in this case parent is eve so 0, Software instance number is main eVe server which is also 0,
  # and finally the object is 3 as this the third object created by the main server
end

.atomes_add(new_atome) ⇒ Object



18
19
20
21
# File 'lib/atome/kernel/universe.rb', line 18

def self.atomes_add(new_atome)
  # @atomes[atome_id] = new_atome
  @atomes << new_atome
end

.connectedObject



27
28
29
# File 'lib/atome/kernel/universe.rb', line 27

def self.connected
  true
end

.initializeObject



13
14
15
# File 'lib/atome/kernel/universe.rb', line 13

def self.initialize
  @atomes = []
end