Extended maintenance of Ruby 1.9.3 ended on February 23, 2015. Read more

In Files

  • rinda/tuplespace.rb

Parent

Rinda::TupleBag::TupleBin

Public Class Methods

new() click to toggle source
 
               # File rinda/tuplespace.rb, line 295
def initialize
  @bin = []
end
            

Public Instance Methods

add(tuple) click to toggle source
 
               # File rinda/tuplespace.rb, line 299
def add(tuple)
  @bin.push(tuple)
end
            
delete(tuple) click to toggle source
 
               # File rinda/tuplespace.rb, line 303
def delete(tuple)
  idx = @bin.rindex(tuple)
  @bin.delete_at(idx) if idx
end
            
find(&blk) click to toggle source
 
               # File rinda/tuplespace.rb, line 308
def find(&blk)
  @bin.reverse_each do |x|
    return x if yield(x)
  end
  nil
end
            

Commenting is here to help enhance the documentation. For example, code samples, or clarification of the documentation.

If you have questions about Ruby or the documentation, please post to one of the Ruby mailing lists. You will get better, faster, help that way.

If you wish to post a correction of the docs, please do so, but also file bug report so that it can be corrected for the next release. Thank you.

If you want to help improve the Ruby documentation, please visit Documenting-ruby.org.