Sha256: b91ae5d9546773a24043a0fa3cf79acfc87497887efdedf222c2bc7e4b548db4
Contents?: true
Size: 396 Bytes
Versions: 3
Compression:
Stored size: 396 Bytes
Contents
require 'redis' class Backend attr_accessor :host, :port, :current_database delegate :get, :set, :info, :keys, :select, :del, :to => :redis def initialize(opts = {}) @host = opts[:host] @port = opts[:port] @current_database = opts[:current_database] end def redis @redis ||= Redis.new(host: host, port: port) @redis.select(current_database) @redis end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
redis_monitor-0.3.2 | lib/engine/app/lib/backend.rb |
redis_monitor-0.3 | lib/engine/app/lib/backend.rb |
redis_monitor-0.2.1 | lib/engine/app/lib/backend.rb |