summaryrefslogtreecommitdiffstats
path: root/lib/iotas/particle.rb
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2012-06-02 22:08:08 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2012-06-02 22:08:08 +0200
commitae7b1c31a84bdad05376ceccb8882286185f70d6 (patch)
tree5955d20358de9086279b5e8c0409866128059f65 /lib/iotas/particle.rb
parent2a461e013ed0dfe7601292d71b080d83b8edcbf0 (diff)
downloadedoors-ruby-ae7b1c31a84bdad05376ceccb8882286185f70d6.zip
edoors-ruby-ae7b1c31a84bdad05376ceccb8882286185f70d6.tar.gz
add Particle#dst_reached! end use it
it allows us to reset Particle@dst before processing it
Diffstat (limited to 'lib/iotas/particle.rb')
-rw-r--r--lib/iotas/particle.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/iotas/particle.rb b/lib/iotas/particle.rb
index 850c6ad..3cb48b3 100644
--- a/lib/iotas/particle.rb
+++ b/lib/iotas/particle.rb
@@ -134,6 +134,12 @@ module Iotas
@dsts.shift
end
#
+ def dst_reached!
+ d = @dst
+ @dst = nil
+ d
+ end
+ #
def error! e, dst=nil
@action = Iotas::ACT_ERROR
@dst = dst||@src