Method: Rinda::TupleBag#delete
- Defined in:
- lib/rinda/tuplespace.rb
#delete(tuple) ⇒ Object
Removes tuple
from the TupleBag.
341 342 343 344 345 346 347 348 |
# File 'lib/rinda/tuplespace.rb', line 341 def delete(tuple) key = bin_key(tuple) bin = @hash[key] return nil unless bin bin.delete(tuple) @hash.delete(key) if bin.empty? tuple end |