lib/sanitize_email/config.rb in sanitize_email-1.0.0.rc1 vs lib/sanitize_email/config.rb in sanitize_email-1.0.0.rc3

- old
+ new

@@ -1,8 +1,13 @@ +require 'facets/module/mattr' # gives cattr + module SanitizeEmail class Config - cattr_accessor :config + + cattr_reader :config + cattr_writer :config + self.config ||= { # Adds the following class attributes to the classes that include NinthBit::SanitizeEmail :force_sanitize => nil, # Specify the BCC addresses for the messages that go out in 'local' environments @@ -29,10 +34,9 @@ # e.g. "real@example.com rest of subject" :use_actual_email_prepended_to_subject => false, :local_environment_proc => Proc.new { true } } - def self.configure &block yield self.config # Gracefully handle deprecated config values. # Actual deprecation warnings are thrown in the top SanitizeEmail module thanks to our use of dynamic methods.