diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2012-05-11 11:39:36 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2012-05-12 09:38:01 +0200 |
commit | 1b84ac25417719b13882e9e22812d307cb8d07ff (patch) | |
tree | 6669136be4294f66cb855a9276f2665e4749697b /lib | |
parent | 5567062313e9a5a03b1bf8c2a4b30c8c2d45258f (diff) | |
download | edoors-ruby-1b84ac25417719b13882e9e22812d307cb8d07ff.zip edoors-ruby-1b84ac25417719b13882e9e22812d307cb8d07ff.tar.gz |
Particle: adapt to non static way
Diffstat (limited to 'lib')
-rw-r--r-- | lib/evendoors/particle.rb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/evendoors/particle.rb b/lib/evendoors/particle.rb index ac9ee3b..161c164 100644 --- a/lib/evendoors/particle.rb +++ b/lib/evendoors/particle.rb @@ -43,11 +43,13 @@ module EvenDoors @door = o['door'] @action = o['action'] @payload = o['payload']||{} - @src = EvenDoors::Spin.spin.search_down o['src'] if o['src'] - @dst = EvenDoors::Spin.spin.search_down o['dst'] if o['dst'] + @src = o['parent'].spin.search_down o['src'] if o['src'] + @dst = o['parent'].spin.search_down o['dst'] if o['dst'] o['dsts'].each do |dst| add_dsts dst end if o['dsts'] set_link_fields *o['link_fields'] if o['link_fields'] - o['merged'].each do |merged| merge! Particle.json_create(merged) end if o['merged'] + o['merged'].each do |particle| + merge! Particle.json_create(particle.merge!('parent'=>o['parent'])) + end if o['merged'] end end # |