Add ScreenedUrl. Rename BlockedEmail to ScreenedEmail.

This commit is contained in:
Neil Lalonde
2013-08-14 11:05:53 -04:00
parent 8fa9c51bf4
commit 86647f0a54
23 changed files with 251 additions and 90 deletions

View File

@@ -31,6 +31,10 @@ module Oneboxer
1.day
end
def self.oneboxer_exists_for_url?(url)
Whitelist.entry_for_url(url) || matchers.any? { |matcher| url =~ matcher.regexp }
end
# Return a oneboxer for a given URL
def self.onebox_for_url(url)
matchers.each do |matcher|