summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/iotas/particle.rb11
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/iotas/particle.rb b/lib/iotas/particle.rb
index 4141953..e723676 100644
--- a/lib/iotas/particle.rb
+++ b/lib/iotas/particle.rb
@@ -76,16 +76,19 @@ module Iotas
end
#
def reset!
- @ts = Time.now
- @src = @dst = @room = @door = @action = @link_value = nil
+ @ts = @src = @dst = @room = @door = @action = @link_value = nil
@dsts.clear
@link_fields.clear
@payload.clear
@merged.clear
end
#
- attr_accessor :src
- attr_reader :ts, :dst, :room, :door, :action, :link_value, :payload
+ def init! src
+ @src = src
+ @ts = Time.now
+ end
+ #
+ attr_reader :ts, :src, :dst, :room, :door, :action, :link_value, :payload
#
# routing
#