summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2012-05-09 11:16:50 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2012-05-09 11:16:50 +0200
commit1681891e1f58298706fbb382d324489762d14562 (patch)
tree660910c2f0fff89a424a9e7cba52ef7b45505126
parente6176c2e5db763dc429158ce894492ec6e7b823f (diff)
downloadedoors-ruby-1681891e1f58298706fbb382d324489762d14562.zip
edoors-ruby-1681891e1f58298706fbb382d324489762d14562.tar.gz
Particle: add #apply_link!
-rw-r--r--lib/evendoors/particle.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/evendoors/particle.rb b/lib/evendoors/particle.rb
index dabe2e9..bb93729 100644
--- a/lib/evendoors/particle.rb
+++ b/lib/evendoors/particle.rb
@@ -80,6 +80,13 @@ module EvenDoors
@payload[EvenDoors::ERROR_FIELD]=e
end
#
+ def apply_link! lnk
+ @src = lnk.door
+ clear_dsts!
+ add_dsts lnk.dsts
+ set_link_fields lnk.fields
+ end
+ #
# data manipulation
#
def []= k, v