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/item/ratings.rb,
lib/recommendations/user/ratings.rb,
lib/recommendations/configuration.rb,
lib/recommendations/item/similarity.rb,
lib/recommendations/user/similarity.rb,
lib/recommendations/user/suggestions.rb
Defined Under Namespace
Classes: Configuration, Item, User
Constant Summary
collapse
- VERSION =
"0.0.5"
Instance Method Summary
collapse
Instance Method Details
#configuration ⇒ Object
16
17
18
|
# File 'lib/recommendations.rb', line 16
def configuration
@configuration ||= Configuration.new
end
|
20
21
22
|
# File 'lib/recommendations.rb', line 20
def configure(&block)
configuration.instance_eval(&block)
end
|
#redis ⇒ Object
24
25
26
27
28
|
# File 'lib/recommendations.rb', line 24
def redis
@redis ||= begin
configuration.redis ? Redis.new(configuration.redis) : Redis.new
end
end
|