Class: MockRedis::ExpireWrapper

Inherits:
Object
  • Object
show all
Includes:
UndefRedisMethods
Defined in:
lib/mock_redis/expire_wrapper.rb

Instance Method Summary collapse

Methods included from UndefRedisMethods

included

Constructor Details

#initialize(db) ⇒ ExpireWrapper

Returns a new instance of ExpireWrapper.



11
12
13
# File 'lib/mock_redis/expire_wrapper.rb', line 11

def initialize(db)
  @db = db
end

Instance Method Details

#initialize_copy(source) ⇒ Object



20
21
22
23
# File 'lib/mock_redis/expire_wrapper.rb', line 20

def initialize_copy(source)
  super
  @db = @db.clone
end

#respond_to?(method, include_private = false) ⇒ Boolean

Returns:

  • (Boolean)


7
8
9
# File 'lib/mock_redis/expire_wrapper.rb', line 7

def respond_to?(method, include_private = false)
  super || @db.respond_to?(method)
end