Class IncludedInRedis
In: lib/spider/included_in_redis.rb
Parent: Object

A specialized class using Redis to track items stored. It supports three operations: new, <<, and include? . Together these can be used to add items to Redis, then determine whether the item has been added.

To use it with Spider use the check_already_seen_with method:

 Spider.start_at('http://example.com/') do |s|
   s.check_already_seen_with IncludedInRedis.new(host: '127.0.0.1', port: 6379)
 end

Methods

<<   include?   new  

Public Class methods

Construct a new IncludedInRedis instance. All arguments here are passed to Redis (part of the redis gem).

Public Instance methods

Add an item to Redis

True if the item is in Redis

[Validate]