lib/3scale_toolbox/remotes.rb in 3scale_toolbox-0.17.1 vs lib/3scale_toolbox/remotes.rb in 3scale_toolbox-0.18.0
- old
+ new
@@ -33,17 +33,17 @@
update do |rmts|
rmts.tap { |r| r[key] = remote }
end
end
- def delete(key)
+ def delete(key, &block)
value = nil
update do |rmts|
# block should return rmts
# but main method should return deleted value
rmts.tap do |r|
value = if block_given?
- r.delete(key, &Proc.new)
+ r.delete(key, &block)
else
r.delete(key)
end
end
end