module PoliteText
Constants
- VERSION
Attributes
custom_swear_words_path[RW]
Public Class Methods
be_polite!(text)
click to toggle source
# File lib/polite_text.rb, line 14 def be_polite!(text) PoliteText::TextCleaner.new(text).clean! end
configure() { |self| ... }
click to toggle source
# File lib/polite_text.rb, line 9 def configure yield self if block_given? check_attrs end
is_polite?(text)
click to toggle source
# File lib/polite_text.rb, line 18 def is_polite?(text) PoliteText::TextScanner.new(text).match_swear_word? end
Private Class Methods
check_attrs()
click to toggle source
# File lib/polite_text.rb, line 24 def check_attrs unless custom_swear_words_path.is_a?(::String) raise(ArgumentError, 'Invalid path to your custom swear words list.') end end