lib/soulmate.rb in soulmate-0.0.6 vs lib/soulmate.rb in soulmate-0.1.0
- old
+ new
@@ -11,11 +11,11 @@
module Soulmate
extend self
MIN_COMPLETE = 2
- STOP_WORDS = ["vs", "at"]
+ DEFAULT_STOP_WORDS = ["vs", "at", "the"]
def redis=(url)
@redis = nil
@redis_url = url
redis
@@ -30,8 +30,16 @@
:port => url.port,
:db => url.path[1..-1],
:password => url.password
})
)
+ end
+
+ def stop_words
+ @stop_words ||= DEFAULT_STOP_WORDS
+ end
+
+ def stop_words=(arr)
+ @stop_words = Array(arr).flatten
end
end