class DodgyStalker::Engines::BannedWords

Public Class Methods

new(input) click to toggle source
# File lib/dodgy_stalker/engines/banned_words.rb, line 4
def initialize(input)
  @input = input
end

Public Instance Methods

banned() click to toggle source
# File lib/dodgy_stalker/engines/banned_words.rb, line 8
def banned
  @banned ||= source.banned.match(input).map(&:word)
end
blacklisted_email() click to toggle source
# File lib/dodgy_stalker/engines/banned_words.rb, line 20
def blacklisted_email
  @blacklisted_email ||= source.email.match(input, true).map(&:word)
end
notify() click to toggle source
# File lib/dodgy_stalker/engines/banned_words.rb, line 16
def notify
  @notify ||= source.to_notify.match(input).map(&:word)
end
on_hold() click to toggle source
# File lib/dodgy_stalker/engines/banned_words.rb, line 12
def on_hold
  @hold ||= source.on_hold.match(input).map(&:word)
end
to_a(with_partials=false) click to toggle source
# File lib/dodgy_stalker/engines/banned_words.rb, line 24
def to_a(with_partials=false)
  @to_a ||= source.match(input, with_partials).map(&:word)
end
to_words(with_partials=false) click to toggle source
# File lib/dodgy_stalker/engines/banned_words.rb, line 28
def to_words(with_partials=false)
  @to_words ||= source.match(input, with_partials)
end

Private Instance Methods

input() click to toggle source
# File lib/dodgy_stalker/engines/banned_words.rb, line 34
def input
  @input
end
source() click to toggle source
# File lib/dodgy_stalker/engines/banned_words.rb, line 38
def source
  DataStore::Wordlist.new
end