Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Clean up formatting

  • Loading branch information...
commit 44ecb5ad549a5283390edb144253409271e9f7b9 1 parent 8569dee
@mloughran authored
Showing with 14 additions and 14 deletions.
  1. +2 −2 init.rb
  2. +12 −12 lib/api_cache.rb
View
4 init.rb
@@ -1,2 +1,2 @@
-#for using api_cache as a rails plugin
-require "api_cache"
+# To use api_cache as a rails plugin
+require "api_cache"
View
24 lib/api_cache.rb
@@ -1,11 +1,11 @@
require 'logger'
# Contains the complete public API for APICache.
-#
+#
# See APICache.get method and the README file.
-#
-# Before using APICache you should set the store to use using
-# APICache.store=. For convenience, when no store is set an in memory store
+#
+# Before using APICache you should set the store to use using
+# APICache.store=. For convenience, when no store is set an in memory store
# will be used (and a warning will be logged).
#
class APICache
@@ -24,25 +24,25 @@ def logger # :nodoc:
log
end
end
-
- # Set the logger to use. If not set, <tt>Logger.new(STDOUT)</tt> will be
+
+ # Set the logger to use. If not set, <tt>Logger.new(STDOUT)</tt> will be
# used.
- #
+ #
def logger=(logger)
@logger = logger
end
-
+
def store # :nodoc:
@store ||= begin
APICache.logger.warn("Using in memory store")
APICache::MemoryStore.new
end
end
-
- # Set the cache store to use. This should either be an instance of a
- # moneta store or a subclass of APICache::AbstractStore. Moneta is
+
+ # Set the cache store to use. This should either be an instance of a
+ # moneta store or a subclass of APICache::AbstractStore. Moneta is
# recommended.
- #
+ #
def store=(store)
@store = begin
if store.class < APICache::AbstractStore
Please sign in to comment.
Something went wrong with that request. Please try again.