module Representable::Cache::ClassMethods
Public Instance Methods
extended(base)
click to toggle source
DCI
Calls superclass method
# File lib/representable/cache.rb, line 56 def extended(base) super(base) base.instance_eval do def representable_cache_options @representable_cache_options end def representable_cache_options=(options) @representable_cache_options = options end end base.representable_cache_options ||= self.representable_cache_options end
included(base)
click to toggle source
inherited representable
Calls superclass method
# File lib/representable/cache.rb, line 71 def included(base) super(base) base.instance_eval do def representable_cache_options @representable_cache_options end def representable_cache_options=(options) @representable_cache_options = options end end base.representable_cache_options = self.representable_cache_options base.representable_cache_options[:cache_name] ||= base.name end
representable_cache(options={})
click to toggle source
# File lib/representable/cache.rb, line 85 def representable_cache(options={}) @representable_cache_options = @representable_cache_options.merge options end
representable_cache_options()
click to toggle source
# File lib/representable/cache.rb, line 59 def representable_cache_options @representable_cache_options end
representable_cache_options=(options)
click to toggle source
# File lib/representable/cache.rb, line 62 def representable_cache_options=(options) @representable_cache_options = options end