Class: Rinda::TupleBag::TupleBin (Ruby 2.7.5)
Description: Class : Rinda::TupleBag::TupleBin - Ruby 2.7.5

### Home Classes Methods

### In Files

- rinda/tuplespace.rb

### Parent

Object

### Methods

- ::new
- #add
- #delete
- #find

### Class/Module Index

Quicksearch

- Rinda
- Rinda::DRbObjectTemplate
- Rinda::InvalidHashTupleKey
- Rinda::NotifyTemplateEntry
- Rinda::RequestCanceledError
- Rinda::RequestExpiredError
- Rinda::RindaError
- Rinda::RingFinger
- Rinda::RingProvider
- Rinda::RingServer
- Rinda::SimpleRenewer
- Rinda::Template
- Rinda::TemplateEntry
- Rinda::Tuple
- Rinda::TupleBag
- Rinda::TupleBag::TupleBin
- Rinda::TupleEntry
- Rinda::TupleSpace
- Rinda::TupleSpaceProxy
- Rinda::WaitTemplateEntry

No matching classes.

# Rinda::TupleBag::TupleBin

### Public Class Methods

new() click to toggle source

                   # File rinda/tuplespace.rb, line 294
    def initialize
      @bin = []
    end

### Public Instance Methods

add(tuple) click to toggle source

                   # File rinda/tuplespace.rb, line 298
    def add(tuple)
      @bin.push(tuple)
    end

delete(tuple) click to toggle source

                   # File rinda/tuplespace.rb, line 302
    def delete(tuple)
      idx = @bin.rindex(tuple)
      @bin.delete_at(idx) if idx
    end

find() click to toggle source

                   # File rinda/tuplespace.rb, line 307
    def find
      @bin.reverse_each do |x|
        return x if yield(x)
      end
      nil
    end