Skip to content

Commit

Permalink
Use class instance vars, not class vars
Browse files Browse the repository at this point in the history
  • Loading branch information
toolmantim committed Sep 16, 2009
1 parent 782a8bb commit 34a5435
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/toadhopper.rb
Expand Up @@ -5,21 +5,21 @@ module Toadhopper
class << self
# Set the API key
def api_key=(key)
@@api_key = key
@api_key = key
end
# Returns the key set by Toadhopper.api_key=
def api_key
@@api_key
@api_key
end
# Sets patterns to [FILTER] out sensitive data such as passwords, emails and credit card numbers.
#
# Toadhopper.filters = /password/, /email/, /credit_card_number/
def filters=(*filters)
@@filters = filters.flatten
@filters = filters.flatten
end
# Returns the filters set by Toadhopper.filters=
def filters
[@@filters].flatten.compact
[@filters].flatten.compact
end
# Replaces the values of the keys matching Toadhopper.filters with [FILTERED]. Typically used on the params and environment hashes.
def filter(hash)
Expand Down

0 comments on commit 34a5435

Please sign in to comment.