Module: BennyCache::ClassMethods
- Defined in:
- lib/benny_cache/related.rb
Instance Method Summary collapse
Instance Method Details
#benny_related_index(*options) ⇒ Object
46 47 48 49 |
# File 'lib/benny_cache/related.rb', line 46 def (*) index_keys = .map {|idx| idx.is_a?(Array) ? idx.map{ |jdx| "#{jdx.to_s}/:#{jdx.to_s}"}.join("/") : idx } self.class_variable_get(:@@benny_related_indexes).push(*index_keys) end |
#benny_related_method(*options) ⇒ Object
51 52 53 54 |
# File 'lib/benny_cache/related.rb', line 51 def (*) index_keys = .map {|idx| idx.is_a?(Array) ? idx.map{ |jdx| "#{jdx.to_s}/:#{jdx.to_s}"}.join("/") : idx } self.class_variable_get(:@@benny_related_methods).push(*index_keys) end |