lib/mock_redis/database.rb
# This method isn't private, but it also isn't a Redis command, so
# it doesn't belong up above with all the Redis commands.
This method isn't private, but it also isn't a Redis command, so
it doesn't belong up above with all the Redis commands.
This method isn ' t private but it also isn ' t a Redis command so it doesn ' t belong up above with all the Redis commands .
def expire_keys
      now = @base.now
      to_delete = expire_times.take_while do |(time, key)|
        (time.to_r * 1_000).to_i <= (now.to_r * 1_000).to_i
      end
      to_delete.each do |(time, key)|
        del(key)
      end
      expire_times.slice!(0, to_delete.length)
    end
def expire_keys now = @base . now to_delete = expire_times . take_while do | ( time , key ) | ( time . to_r * 1_000 ) . to_i <= ( now . to_r * 1_000 ) . to_i end to_delete . each do | ( time , key ) | del ( key ) end expire_times . slice! ( 0 , to_delete . length ) end
This method isn't private, but it also isn't a Redis command, so
it doesn't belong up above with all the Redis commands.
This method isn ' t private but it also isn ' t a Redis command so it doesn ' t belong up above with all the Redis commands .