Module: NaughtyWords

Defined in:
lib/naughty_words.rb,
lib/naughty_words/base.rb,
lib/naughty_words/version.rb

Defined Under Namespace

Classes: Base, Error

Constant Summary collapse

VERSION =
"0.1.3"

Class Method Summary collapse

Class Method Details

.add_to_allow_list(string:) ⇒ Object



21
22
23
# File 'lib/naughty_words.rb', line 21

def add_to_allow_list(string:)
  Base.add_to_list(list: "allow_list_file", string: string)
end

.add_to_deny_list(string:) ⇒ Object



17
18
19
# File 'lib/naughty_words.rb', line 17

def add_to_deny_list(string:)
  Base.add_to_list(list: "deny_list_file", string: string)
end

.check(string:) ⇒ Object



9
10
11
# File 'lib/naughty_words.rb', line 9

def check(string:)
  Base.profanity?(string: string)
end

.filter(string:, replacement: "*") ⇒ Object



13
14
15
# File 'lib/naughty_words.rb', line 13

def filter(string:, replacement: "*")
  Base.filter(string: string, replacement: replacement)
end

.show_list(list:) ⇒ Object



25
26
27
# File 'lib/naughty_words.rb', line 25

def show_list(list:)
  Base.show_list(list: list)
end