summaryrefslogtreecommitdiffstats
path: root/lib/iotas
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2012-05-24 22:53:13 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2012-05-24 22:53:13 +0200
commit09994956cc776aeca308397479f9e7ddff891aa3 (patch)
tree29f53199292e45e5e22c792127130c4f4a7703fb /lib/iotas
parenta3b20c77f2d6496362806ddc3886f42d76298625 (diff)
downloadedoors-ruby-09994956cc776aeca308397479f9e7ddff891aa3.zip
edoors-ruby-09994956cc776aeca308397479f9e7ddff891aa3.tar.gz
Iota register themselves into Spin@world
Diffstat (limited to 'lib/iotas')
-rw-r--r--lib/iotas/iota.rb5
1 files changed, 4 insertions, 1 deletions
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