Module: Recommendable::Helpers::RedisKeyMapper
- Defined in:
- lib/recommendable/helpers/redis_key_mapper.rb
Class Method Summary collapse
- .disliked_by_set_for(klass, id) ⇒ Object
- .liked_by_set_for(klass, id) ⇒ Object
- .score_set_for(klass) ⇒ Object
- .similarity_set_for(id) ⇒ Object
- .temp_set_for(klass, id) ⇒ Object
Class Method Details
.disliked_by_set_for(klass, id) ⇒ Object
19 20 21 |
# File 'lib/recommendable/helpers/redis_key_mapper.rb', line 19 def disliked_by_set_for(klass, id) [redis_namespace, ratable_namespace(klass), id, 'disliked_by'].compact.join(':') end |
.liked_by_set_for(klass, id) ⇒ Object
15 16 17 |
# File 'lib/recommendable/helpers/redis_key_mapper.rb', line 15 def liked_by_set_for(klass, id) [redis_namespace, ratable_namespace(klass), id, 'liked_by'].compact.join(':') end |
.score_set_for(klass) ⇒ Object
23 24 25 |
# File 'lib/recommendable/helpers/redis_key_mapper.rb', line 23 def score_set_for(klass) [redis_namespace, ratable_namespace(klass), 'scores'].join(':') end |
.similarity_set_for(id) ⇒ Object
11 12 13 |
# File 'lib/recommendable/helpers/redis_key_mapper.rb', line 11 def similarity_set_for(id) [redis_namespace, user_namespace, id, 'similarities'].compact.join(':') end |
.temp_set_for(klass, id) ⇒ Object
27 28 29 |
# File 'lib/recommendable/helpers/redis_key_mapper.rb', line 27 def temp_set_for(klass, id) [redis_namespace, ratable_namespace(klass), id, 'temp'].compact.join(':') end |