This instructions allow you to take periodical heapdumps.
To use in your project, first install heapdump, then add the following code to your app just after requiring 'fs'.
This instructions allow you to take periodical heapdumps.
To use in your project, first install heapdump, then add the following code to your app just after requiring 'fs'.
# Simple Recommendation Engine in Ruby | |
# Visit: http://otobrglez.opalab.com | |
# Author: Oto Brglez <otobrglez@gmail.com> | |
class Book < Struct.new(:title) | |
def words | |
@words ||= self.title.gsub(/[a-zA-Z]{3,}/).map(&:downcase).uniq.sort | |
end |