Module: Recommendations
- Extended by:
- Recommendations
- Included in:
- Recommendations
- Defined in:
- lib/recommendations.rb,
lib/recommendations/item.rb,
lib/recommendations/user.rb,
lib/recommendations/version.rb,
lib/recommendations/user/ratings.rb,
lib/recommendations/configuration.rb,
lib/recommendations/item/similarity.rb
Defined Under Namespace
Classes: Configuration, Item, User
Constant Summary
collapse
- MAX_VAL =
2
- VERSION =
"0.0.3"
Instance Method Summary
collapse
Instance Method Details
#configuration ⇒ Object
13
14
15
|
# File 'lib/recommendations.rb', line 13
def configuration
@configuration ||= Configuration.new
end
|
17
18
19
|
# File 'lib/recommendations.rb', line 17
def configure(&block)
configuration.instance_eval(&block)
end
|
#redis ⇒ Object
21
22
23
24
25
|
# File 'lib/recommendations.rb', line 21
def redis
@redis ||= begin
configuration.redis ? Redis.new(configuration.redis) : Redis.new
end
end
|