lib/atome/kernel/universe.rb in atome-0.5.6.1.4 vs lib/atome/kernel/universe.rb in atome-0.5.6.1.9
- old
+ new
@@ -7,10 +7,13 @@
@atome_list = []
@particle_list = {}
@renderer_list = %i[html browser headless server log]
@sanitizers = {}
@specificities = {}
+
+ @categories = %w[ communication effect event geometry hierarchy identity material
+ property security spatial time utility ]
@history = {}
@users = {}
@help = {}
@example = {}
@@ -31,14 +34,18 @@
def get_example(particle)
@example[particle]
end
- def add_to_particle_list(particle = nil, type)
- instance_variable_get('@particle_list')[particle] = type
+ def categories
+ @categories
end
+ def add_to_particle_list(particle = nil, type, category)
+ instance_variable_get('@particle_list')[particle] = { type: type, category: category }
+ end
+
def add_atomes_specificities atome_type_to_add
@specificities[atome_type_to_add] = {}
end
def set_atomes_specificities params
@@ -76,23 +83,19 @@
end
def user_atomes
collected_id = []
@atomes.each do |id_found, atome_found|
- unless atome_found.tag && atome_found.tag[:system]
- collected_id << id_found
- end
+ collected_id << id_found unless atome_found.tag && atome_found.tag[:system]
end
collected_id
end
def system_atomes
collected_id = []
@atomes.each do |id_found, atome_found|
- if atome_found.tag && atome_found.tag[:system]
- collected_id << id_found
- end
+ collected_id << id_found if atome_found.tag && atome_found.tag[:system]
end
collected_id
end
def app_identity
@@ -151,10 +154,11 @@
current_machine_decision(platform, output)
# TODO: check the code above and create a sensible identity
end
def current_server
- return unless RUBY_ENGINE.downcase == 'opal' # Remplacez 'atome' par la valeur correcte pour votre environnement Atome
+ # Remplacez 'atome' par la valeur correcte pour votre environnement Atome
+ return unless RUBY_ENGINE.downcase == 'opal'
JS.global[:location][:href].to_s
end
def current_user