Sha256: 7886ff25a360fc0cef77dae3d6eb1b11ecf1d368f873c4a8fc542e9f9ece21f6

Contents?: true

Size: 331 Bytes

Versions: 12

Compression:

Stored size: 331 Bytes

Contents

require "hiredis/connection"

class Redic
  module Connection
    def self.new(uri, timeout)
      connection = Hiredis::Connection.new

      if uri.scheme == "unix"
        connection.connect_unix(uri.path, timeout)
      else
        connection.connect(uri.host, uri.port, timeout)
      end

      connection
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
redic-1.5.3 lib/redic/connection.rb
redic-1.5.2 lib/redic/connection.rb
redic-1.5.1 lib/redic/connection.rb
redic-1.5.0 lib/redic/connection.rb
redic-1.4.1 lib/redic/connection.rb
redic-1.4.0 lib/redic/connection.rb
redic-1.3.0 lib/redic/connection.rb
redic-1.2.0 lib/redic/connection.rb
redic-1.1.1 lib/redic/connection.rb
redic-1.1.0 lib/redic/connection.rb
redic-1.0.1 lib/redic/connection.rb
redic-1.0.0 lib/redic/connection.rb