Module: HasCache::Mixin::ClassMethods

Defined in:
lib/has_cache/mixin.rb

Overview

Mixin class methods

Instance Method Summary collapse

Instance Method Details

#has_cache(*args) ⇒ Object



8
9
10
11
12
13
14
15
16
# File 'lib/has_cache/mixin.rb', line 8

def has_cache(*args)
  cattr_accessor :has_cache_options

  options = args.extract_options!
  self.has_cache_options = options || {}

  extend HasCache::Mixin::CachedMethod
  include HasCache::Mixin::CachedMethod
end