Sha256: 287fa899f67e4f203440947eac92442aebbe922c60026a89009474ab911572e5
Contents?: true
Size: 343 Bytes
Versions: 1
Compression:
Stored size: 343 Bytes
Contents
require "redis" module Twitchus class Storage def initialize(host, port, key) @client = Redis.new(host: host, port: port) @key = key end # Add an item to the list specified in config def push(item) @client.lpush(@key, item) if item end def clear @client.expire @key, -1 end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
twitchus-0.1.1 | lib/twitchus/storage.rb |