Module: Redis::Store::RedisVersion

Included in:
Redis::Store
Defined in:
lib/redis/store/redis_version.rb

Instance Method Summary collapse

Instance Method Details

#redis_versionObject



4
5
6
# File 'lib/redis/store/redis_version.rb', line 4

def redis_version
  info('server')['redis_version']
end

#supports_redis_version?(version) ⇒ Boolean

Returns:

  • (Boolean)


8
9
10
# File 'lib/redis/store/redis_version.rb', line 8

def supports_redis_version?(version)
  (redis_version.split(".").map(&:to_i) <=> version.split(".").map(&:to_i)) >= 0
end