Skip to content

Commit

Permalink
accept Cache clients
Browse files Browse the repository at this point in the history
  • Loading branch information
seamusabshere committed Feb 23, 2011
1 parent 6191e47 commit 151404a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion lib/cache_method/config.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@ class Config
# Example: # Example:
# CacheMethod.config.storage = Memcached.new '127.0.0.1:11211' # CacheMethod.config.storage = Memcached.new '127.0.0.1:11211'
def storage=(raw_client) def storage=(raw_client)
@storage = ::Cache.new raw_client if raw_client.is_a?(::Cache)
@storage = raw_client
else
@storage = ::Cache.new raw_client
end
end end


def storage #:nodoc: def storage #:nodoc:
Expand Down
2 changes: 1 addition & 1 deletion lib/cache_method/version.rb
Original file line number Original file line Diff line number Diff line change
@@ -1,3 +1,3 @@
module CacheMethod module CacheMethod
VERSION = "0.1.1" VERSION = "0.1.2"
end end

0 comments on commit 151404a

Please sign in to comment.