Skip to content

Commit

Permalink
Condensing actsasflinn's catter declaration
Browse files Browse the repository at this point in the history
  (thanks for the patch!)
  • Loading branch information
adambair committed Jun 14, 2009
1 parent 8e9a068 commit 549a727
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions lib/profanity_filter.rb
Expand Up @@ -31,14 +31,10 @@ def setup_callbacks_for(attr_name, option)
end

class Base
cattr_accessor :replacement_text
cattr_accessor :replacement_text, :dictionary_file, :dictionary
@@replacement_text = '@#$%'

cattr_accessor :dictionary_file
@@dictionary_file = File.join(File.dirname(__FILE__), '../config/dictionary.yml')

cattr_accessor :dictionary
@@dictionary = YAML.load_file(@@dictionary_file)
@@dictionary_file = File.join(File.dirname(__FILE__), '../config/dictionary.yml')
@@dictionary = YAML.load_file(@@dictionary_file)

class << self
def clean(text, replace_method = '')
Expand Down

0 comments on commit 549a727

Please sign in to comment.