From 09994956cc776aeca308397479f9e7ddff891aa3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Thu, 24 May 2012 22:53:13 +0200 Subject: Iota register themselves into Spin@world --- lib/iotas/iota.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/iotas/iota.rb b/lib/iotas/iota.rb index 93ea6a1..133a6dd 100644 --- a/lib/iotas/iota.rb +++ b/lib/iotas/iota.rb @@ -30,7 +30,10 @@ module Iotas @viewer = nil # particle going through that position will be sent there readonly @path = ( @parent ? @parent.path+Iotas::PATH_SEP : '') + @name @spin = ( @parent ? @parent.spin : self ) - @parent.add_iota self if @parent + if @parent + @parent.add_iota self + @spin.add_to_world self if @spin.is_a? Iotas::Spin + end end # attr_reader :name, :path, :spin -- cgit v1.1-2-g2b99