summaryrefslogtreecommitdiffstats
path: root/lib/iotas/iota.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/iotas/iota.rb')
-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