aboutsummaryrefslogtreecommitdiffstats
path: root/src/dumm/ext/lib
diff options
context:
space:
mode:
authorMartin Willi <martin@strongswan.org>2009-04-07 14:56:19 +0000
committerMartin Willi <martin@strongswan.org>2009-04-07 14:56:19 +0000
commit801548155cda1e4ccff51dd38607c360092a254e (patch)
tree071579fd4bcc1e5115c5052fbea64423371a30bf /src/dumm/ext/lib
parentc4087a8e7092695f9b0e0eaec3fa585d2019f889 (diff)
downloadstrongswan-801548155cda1e4ccff51dd38607c360092a254e.tar.bz2
strongswan-801548155cda1e4ccff51dd38607c360092a254e.tar.xz
use safe each() implementations, allowing delete() in block
implement Client.reset() in ruby
Diffstat (limited to 'src/dumm/ext/lib')
-rw-r--r--src/dumm/ext/lib/dumm.rb1
-rw-r--r--src/dumm/ext/lib/dumm/guest.rb7
2 files changed, 8 insertions, 0 deletions
diff --git a/src/dumm/ext/lib/dumm.rb b/src/dumm/ext/lib/dumm.rb
index f7d72f5b4..d1450f5df 100644
--- a/src/dumm/ext/lib/dumm.rb
+++ b/src/dumm/ext/lib/dumm.rb
@@ -28,6 +28,7 @@ module Dumm
Bridge.each { |bridge|
bridge.delete
}
+ return nil
end
end
diff --git a/src/dumm/ext/lib/dumm/guest.rb b/src/dumm/ext/lib/dumm/guest.rb
index 8485d1a08..a65a0a7e9 100644
--- a/src/dumm/ext/lib/dumm/guest.rb
+++ b/src/dumm/ext/lib/dumm/guest.rb
@@ -34,6 +34,13 @@ module Dumm
end
self[id]
end
+
+ # delete all interfaces
+ def reset
+ each {|i|
+ i.delete
+ }
+ end
end
end