Sha256: 18ff770107f1af31987e8b600af4d872dd1ce8a9e4e11d773cac695f3fb3b8e5

Contents?: true

Size: 428 Bytes

Versions: 1

Compression:

Stored size: 428 Bytes

Contents

begin
  require "fakeredis"
rescue LoadError
  require "redis"
end

require "active_orm/redis/base"
require "active_orm/redis/configuration"
class ActiveOrm::Redis < ActiveOrm::Base

  extend Base

  attr_accessor :client

  def initialize(client=nil)
    @client ||= (client.nil? ? ActiveOrm::Redis.configuration.client : client)
  end

  def self.client(client=nil)
    client.nil? ? new.client : new(client).client
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
active_orm-2.2.0 lib/active_orm/redis.rb