Sha256: 2eeba1e7d51148e676aed3c15d73f553bab4ed0553d9dfc98a1c07d7fb4bfd85

Contents?: true

Size: 377 Bytes

Versions: 5

Compression:

Stored size: 377 Bytes

Contents

require "redis"

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

5 entries across 5 versions & 1 rubygems

Version Path
active_orm-2.1.0 lib/active_orm/redis.rb
active_orm-2.0.2 lib/active_orm/redis.rb
active_orm-2.0.1 lib/active_orm/redis.rb
active_orm-2.0.0 lib/active_orm/redis.rb
active_orm-1.0.0 lib/active_orm/redis.rb