Class: AnyCache::Adapters::Delegator Private

Inherits:
Basic
  • Object
show all
Defined in:
lib/any_cache/adapters/delegator.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Since:

  • 0.1.0

Direct Known Subclasses

ActiveSupportNaiveStore

Instance Attribute Summary

Attributes inherited from Basic

#driver

Class Method Summary collapse

Methods inherited from Basic

#clear, #decrement, #delete, #exist?, #expire, #fetch, #increment, #initialize, #persist, #read, #write

Constructor Details

This class inherits a constructor from AnyCache::Adapters::Basic

Class Method Details

.supported_driver?(driver) ⇒ Boolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Parameters:

  • driver (Object)

Returns:

  • (Boolean)

Since:

  • 0.1.0



13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/any_cache/adapters/delegator.rb', line 13

def supported_driver?(driver)
  driver.respond_to?(:read) &&
  driver.respond_to?(:write) &&
  driver.respond_to?(:delete) &&
  driver.respond_to?(:increment) &&
  driver.respond_to?(:decrement) &&
  driver.respond_to?(:expire) &&
  driver.respond_to?(:persist) &&
  driver.respond_to?(:clear) &&
  driver.respond_to?(:exist?) &&
  driver.respond_to?(:fetch)
end