class Rinda::TupleBag::TupleBin
Public Class Methods
# File lib/rinda/tuplespace.rb, line 294 def initialize @bin = [] end
Public Instance Methods
# File lib/rinda/tuplespace.rb, line 298 def add(tuple) @bin.push(tuple) end
# File lib/rinda/tuplespace.rb, line 302 def delete(tuple) idx = @bin.rindex(tuple) @bin.delete_at(idx) if idx end
# File lib/rinda/tuplespace.rb, line 307 def find @bin.reverse_each do |x| return x if yield(x) end nil end
Ruby Core © 1993–2020 Yukihiro Matsumoto
Licensed under the Ruby License.
Ruby Standard Library © contributors
Licensed under their own licenses.