<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -4,7 +4,7 @@ module ProfanityFilter
   def self.included(base)
     base.extend(ClassMethods)
   end
-  
+
   module ClassMethods
     def profanity_filter!(*attr_names)
       option = attr_names.pop[:method] rescue nil if attr_names.last.is_a?(Hash)
@@ -31,19 +31,28 @@ module ProfanityFilter
   end
   
   class Base
-    DICTIONARY = YAML.load_file(File.join(File.dirname(__FILE__), '../config/dictionary.yml'))
+    cattr_accessor :replacement_text
+    @@replacement_text = '@#$%'
 
-    def self.clean(text, replace_method = '')
-      return text if text.blank?
-      text.split(/(\W)/).collect{|word| replace_method == 'dictionary' ? clean_word_dictionary(word) : clean_word_basic(word)}.join
-    end
+    cattr_accessor :dictionary_file
+    @@dictionary_file = File.join(File.dirname(__FILE__), '../config/dictionary.yml')
 
-    def self.clean_word_dictionary(word)
-      DICTIONARY.include?(word.downcase.squeeze) &amp;&amp; word.size &gt; 2 ? DICTIONARY[word.downcase.squeeze] : word
-    end
+    cattr_accessor :dictionary
+    @@dictionary = YAML.load_file(@@dictionary_file)
 
-    def self.clean_word_basic(word)
-      DICTIONARY.include?(word.downcase.squeeze) &amp;&amp; word.size &gt; 2 ? '@#$%' : word
+    class &lt;&lt; self
+      def clean(text, replace_method = '')
+        return text if text.blank?
+        text.split(/(\W)/).collect{|word| replace_method == 'dictionary' ? clean_word_dictionary(word) : clean_word_basic(word)}.join
+      end
+
+      def clean_word_dictionary(word)
+        dictionary.include?(word.downcase.squeeze) &amp;&amp; word.size &gt; 2 ? dictionary[word.downcase.squeeze] : word
+      end
+
+      def clean_word_basic(word)
+        dictionary.include?(word.downcase.squeeze) &amp;&amp; word.size &gt; 2 ? replacement_text : word
+      end
     end
   end
 end</diff>
      <filename>lib/profanity_filter.rb</filename>
    </modified>
    <modified>
      <diff>@@ -2,6 +2,15 @@
 
 require 'yaml'
 require 'benchmark'
+
+begin
+  require File.dirname(__FILE__) + '/../../../../config/boot'
+  require 'active_support'
+rescue LoadError
+  require 'rubygems'
+  require 'active_support'
+end
+
 require File.join(File.dirname(__FILE__), '../../lib/profanity_filter')
 
 def silently(&amp;block)
@@ -14,7 +23,7 @@ end
 
 %w(100 1000 5000 25000 50000 100000).each do |dictionary_count|
   puts &quot;\n#{dictionary_count} word dictionary-----&quot;
-  silently {ProfanityFilter::Base::DICTIONARY = YAML.load_file(File.join(File.dirname(__FILE__), &quot;dictionary_test_#{dictionary_count}.yml&quot;))}
+  silently {ProfanityFilter::Base.dictionary = YAML.load_file(File.join(File.dirname(__FILE__), &quot;dictionary_test_#{dictionary_count}.yml&quot;))}
   %w(100 1000 5000 10000).each do |word_count|
     puts &quot;\n  --#{word_count} words string-----&quot;
     text = ''
@@ -31,4 +40,4 @@ end
   end
 end
 
-# ProfanityFilter::Base.clean('fucker')
\ No newline at end of file
+# ProfanityFilter::Base.clean('fucker')</diff>
      <filename>test/benchmark/fu-fu_benchmark.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>1f45119008d700bb37ffaacd9c9056f68311e12c</id>
    </parent>
  </parents>
  <author>
    <name>Flinn</name>
    <email>fmueller@flinns-macbook-pro.local</email>
  </author>
  <url>http://github.com/adambair/fu-fu/commit/8e9a068495254657d4fbcfcef52bb89742a95897</url>
  <id>8e9a068495254657d4fbcfcef52bb89742a95897</id>
  <committed-date>2009-02-12T10:43:36-08:00</committed-date>
  <authored-date>2009-02-12T10:43:36-08:00</authored-date>
  <message>allow dynamic word list from a method instead of a constant to allow for user supplied words</message>
  <tree>ee907e42b63ec52065bbade204e4d32ecd592480</tree>
  <committer>
    <name>Flinn</name>
    <email>fmueller@flinns-macbook-pro.local</email>
  </committer>
</commit>
