bad_word_detector 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
    
        data/lib/bad_word_detector.rb
    CHANGED
    
    | 
         @@ -67,6 +67,11 @@ class BadWordDetector 
     | 
|
| 
       67 
67 
     | 
    
         
             
                end
         
     | 
| 
       68 
68 
     | 
    
         
             
                @library = PrefixTree.new library
         
     | 
| 
       69 
69 
     | 
    
         
             
                @whitelist = Whitelist.new whitelist
         
     | 
| 
      
 70 
     | 
    
         
            +
                @library.freeze
         
     | 
| 
      
 71 
     | 
    
         
            +
                @whitelist.freeze
         
     | 
| 
      
 72 
     | 
    
         
            +
                @rule_sets.freeze
         
     | 
| 
      
 73 
     | 
    
         
            +
                @string_sets.freeze
         
     | 
| 
      
 74 
     | 
    
         
            +
                self.freeze
         
     | 
| 
       70 
75 
     | 
    
         
             
                true
         
     | 
| 
       71 
76 
     | 
    
         
             
              end
         
     | 
| 
       72 
77 
     | 
    
         | 
| 
         @@ -99,6 +104,9 @@ class BadWordDetector 
     | 
|
| 
       99 
104 
     | 
    
         
             
                  index += 1
         
     | 
| 
       100 
105 
     | 
    
         
             
                end
         
     | 
| 
       101 
106 
     | 
    
         
             
              end
         
     | 
| 
      
 107 
     | 
    
         
            +
              def inspect
         
     | 
| 
      
 108 
     | 
    
         
            +
                "#<#{self.class.name}:#{self.object_id}>"
         
     | 
| 
      
 109 
     | 
    
         
            +
              end
         
     | 
| 
       102 
110 
     | 
    
         | 
| 
       103 
111 
     | 
    
         
             
            private
         
     | 
| 
       104 
112 
     | 
    
         
             
              def find_part(text, index)
         
     |