Class: RWGet::Dupes
- Inherits:
-
Object
- Object
- RWGet::Dupes
- Defined in:
- lib/rwget/dupes.rb
Constant Summary collapse
- SIZE =
1_000_000
Instance Method Summary collapse
- #dupe?(uri) ⇒ Boolean
-
#initialize(options = {}) ⇒ Dupes
constructor
A new instance of Dupes.
Constructor Details
Instance Method Details
#dupe?(uri) ⇒ Boolean
12 13 14 15 16 17 |
# File 'lib/rwget/dupes.rb', line 12 def dupe?(uri) key = uri.to_s return true if @bloom.include?(key) @bloom.insert(key) return false end |