Skip to content

Commit

Permalink
Update TODO list and README formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
adambair committed Jan 21, 2010
1 parent b3e0510 commit 5651f59
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions README.rdoc
Expand Up @@ -19,13 +19,16 @@ Notice -- there are two profanity filters, one is destructive. Beware the excla
Non-Destructive (filters content when called, original text remains in the database)

profanity_filter :foo, :bar
# banned words will be replaced with @#$%
#=> banned words will be replaced with @#=>$%

profanity_filter :foo, :bar, :method => 'dictionary'
# banned words will be replaced by value in config/dictionary.yml
#=> banned words will be replaced by value in config/dictionary.yml

profanity_filter :foo, :bar, :method => 'vowels'
# banned words will have their vowels replaced
#=> banned words will have their vowels replaced

profanity_filter :foo, :bar, :method => 'hollow'
# all letters except the first and last will be replaced
#=> all letters except the first and last will be replaced

The non-destructive profanity_filter provides different versions of the filtered attribute:
some_model.foo => 'filtered version'
Expand All @@ -34,13 +37,16 @@ Non-Destructive (filters content when called, original text remains in the datab
Destructive (saves the filtered content to the database)

profanity_filter! :foo, :bar
# banned words will be replaced with @#$%
#=> banned words will be replaced with @#=>$%

profanity_filter! :foo, :bar, :method => 'dictionary'
# banned words will be replaced by value in config/dictionary.yml
#=> banned words will be replaced by value in config/dictionary.yml

profanity_filter! :foo, :bar, :method => 'vowels'
# banned words will have their vowels replaced
#=> banned words will have their vowels replaced

profanity_filter! :foo, :bar, :method => 'hollow'
# all letters except the first and last will be replaced
#=> all letters except the first and last will be replaced

=== You can also use the filter directly:

Expand All @@ -64,6 +70,7 @@ You can run the benchmarks via:
* May break ProfanityFilter out on it's own
* Clean up dictionary implementation and substitution (suboptimal and messy)
* Move benchmarks into a rake task
* Build out rdocs

== License

Expand Down

0 comments on commit 5651f59

Please sign in to comment.