lib/linda/tuplespace.rb in linda-0.0.4 vs lib/linda/tuplespace.rb in linda-0.1.0

- old
+ new

@@ -102,9 +102,16 @@ callback = {:type => :watch, :callback => block, :tuple => tuple} @callbacks.unshift callback callback end + def list(tuple) + tuple = Tuple.new tuple unless kind_of? Tuple + @tuples.select do |t| + tuple.match? t + end + end + def check_expire expires = [] self.each do |tuple| expires.push(tuple) if tuple.expire_at and tuple.expire_at < Time.now end