summaryrefslogtreecommitdiffstats
path: root/lib/evendoors/spin.rb
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2012-05-11 11:32:53 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2012-05-12 09:38:00 +0200
commita1ce57fbbe635c6ae2667e534d070b1ec9feb713 (patch)
treec994b7a27366d3132f216226ef00ae2025ddbf2d /lib/evendoors/spin.rb
parentc063c281b79c02847c99805576622f37d6124d16 (diff)
downloadedoors-ruby-a1ce57fbbe635c6ae2667e534d070b1ec9feb713.zip
edoors-ruby-a1ce57fbbe635c6ae2667e534d070b1ec9feb713.tar.gz
Spin: rewrite parent stuff
Diffstat (limited to 'lib/evendoors/spin.rb')
-rw-r--r--lib/evendoors/spin.rb10
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/evendoors/spin.rb b/lib/evendoors/spin.rb
index 1316c82..69d204d 100644
--- a/lib/evendoors/spin.rb
+++ b/lib/evendoors/spin.rb
@@ -35,17 +35,15 @@ module EvenDoors
@debug_routing = o[:debug_routing]||o['debug_routing']||false
#
if not o.empty?
+ p ={'parent'=>self}
o['spots'].each do |name,spot|
- spot['parent']=self
- EvenDoors::Room.json_create(spot)
+ EvenDoors::Room.json_create(spot.merge!(p))
end if o['spots']
o['app_fifo'].each do |particle|
- particle['parent']=self
- @app_fifo << EvenDoors::Particle.json_create(particle)
+ @app_fifo << EvenDoors::Particle.json_create(particle.merge!(p))
end if o['app_fifo']
o['sys_fifo'].each do |particle|
- particle['parent']=self
- @sys_fifo << EvenDoors::Particle.json_create(particle)
+ @sys_fifo << EvenDoors::Particle.json_create(particle.merge!(p))
end if o['sys_fifo']
end
end