class PoliteText::TextScanner
Attributes
text[R]
Public Class Methods
new(text)
click to toggle source
# File lib/polite_text/text_scanner.rb, line 5 def initialize(text) raise ArgumentError.new('The text can not be nil') if text.nil? @text = text.to_s end
Public Instance Methods
match_swear_word?()
click to toggle source
# File lib/polite_text/text_scanner.rb, line 11 def match_swear_word? !@text.match?(swear_words) end