module Cacheable
Constants
- VERSION
Public Class Methods
escape_punctuation(string)
click to toggle source
# File lib/cacheable.rb, line 25 def self.escape_punctuation(string) string.sub(/\?\Z/, '_query').sub(/!\Z/, '_bang') end
included(base)
click to toggle source
# File lib/cacheable.rb, line 10 def self.included(base) base.extend(Cacheable::Caches) base.send :include, Cacheable::Keys base.send :include, Cacheable::Expiry base.send :extend, ClassMethods base.class_eval do class_attribute :cached_key, :cached_indices, :cached_methods, :cached_class_methods, :cached_associations end end
rails4?()
click to toggle source
# File lib/cacheable.rb, line 29 def self.rails4? ActiveRecord::VERSION::MAJOR >= 4 end