File: redis_version.rb

package info (click to toggle)
ruby-redis-store 1.10.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 312 kB
  • sloc: ruby: 1,480; makefile: 6
file content (13 lines) | stat: -rw-r--r-- 290 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
class Redis
  class Store < self
    module RedisVersion
      def redis_version
        info('server')['redis_version']
      end

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