Module: Representable::Cache::ClassMethods
- Defined in:
- lib/representable/cache.rb
Instance Method Summary collapse
-
#extended(base) ⇒ Object
DCI.
-
#included(base) ⇒ Object
inherited representable.
- #representable_cache(options = {}) ⇒ Object
- #representable_cache_options ⇒ Object
Instance Method Details
#extended(base) ⇒ Object
DCI
46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/representable/cache.rb', line 46 def extended(base) super(base) base.instance_eval do def @representable_cache_options end def () @representable_cache_options = end end base. ||= self. end |
#included(base) ⇒ Object
inherited representable
61 62 63 64 65 66 67 68 69 70 71 72 73 |
# File 'lib/representable/cache.rb', line 61 def included(base) super(base) base.instance_eval do def @representable_cache_options end def () @representable_cache_options = end end base. = self. base.[:cache_name] ||= base.name end |
#representable_cache(options = {}) ⇒ Object
75 76 77 |
# File 'lib/representable/cache.rb', line 75 def representable_cache(={}) @representable_cache_options = @representable_cache_options.merge end |
#representable_cache_options ⇒ Object
79 80 81 |
# File 'lib/representable/cache.rb', line 79 def @representable_cache_options ||={} end |