Module: NaughtyWords

Defined in:
lib/naughty_words.rb,
lib/naughty_words/base.rb,
lib/naughty_words/config.rb,
lib/naughty_words/version.rb,
lib/naughty_words/word_list.rb,
lib/generators/naughty_words/install/install_generator.rb,
lib/generators/naughty_words/install/templates/word_list.rb

Defined Under Namespace

Modules: Generators Classes: Base, Config, Error, WordList

Constant Summary collapse

VERSION =
"1.0.0"

Class Method Summary collapse

Class Method Details

.check(string:) ⇒ Object



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

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

.configureObject



11
12
13
# File 'lib/naughty_words.rb', line 11

def self.configure
  Config.configure { |config| yield(config) }
end

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



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

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

.show_list(list:, include_metadata: false) ⇒ Object



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

def show_list(list:, include_metadata: false)
  Base.show_list(list: list, include_metadata: )
end