Sha256: 0f3e1d487cfacf721e3b925c62f94619b1cf9c161f468ade006bc08c7fc4ed6c

Contents?: true

Size: 288 Bytes

Versions: 1

Compression:

Stored size: 288 Bytes

Contents

require 'singleton'

module Smooth
  def self.cache
    Smooth::Cache.instance
  end

  class Cache
    include Singleton

    def method_missing meth, *args, &block
      if defined? ::Rails
        return ::Rails.cache.send(meth, *args, &block)
      end

      super
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
smooth-2.0.1 lib/smooth/cache.rb