diff options
author | José Valim <jose.valim@gmail.com> | 2011-05-24 10:35:46 -0700 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2011-05-24 10:35:46 -0700 |
commit | c4a9467af4f2e08db50b350a6ffca9bf4026ef59 (patch) | |
tree | c812cb4088b39425d58e831142c1b7eb16488d6c /actionmailer/lib/action_mailer/adv_attr_accessor.rb | |
parent | ae323a51f1dcf5529f34927cb91693a993416b07 (diff) | |
parent | d500ad3f053517505458c3977f919ee962d04b24 (diff) | |
download | rails-c4a9467af4f2e08db50b350a6ffca9bf4026ef59.tar.gz rails-c4a9467af4f2e08db50b350a6ffca9bf4026ef59.tar.bz2 rails-c4a9467af4f2e08db50b350a6ffca9bf4026ef59.zip |
Merge pull request #1271 from joshk/remove_am_deprecated_methods
Removed deprecated ActionMailer API and related tests
Diffstat (limited to 'actionmailer/lib/action_mailer/adv_attr_accessor.rb')
-rw-r--r-- | actionmailer/lib/action_mailer/adv_attr_accessor.rb | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/actionmailer/lib/action_mailer/adv_attr_accessor.rb b/actionmailer/lib/action_mailer/adv_attr_accessor.rb deleted file mode 100644 index c1aa8021ce..0000000000 --- a/actionmailer/lib/action_mailer/adv_attr_accessor.rb +++ /dev/null @@ -1,28 +0,0 @@ -module ActionMailer - module AdvAttrAccessor #:nodoc: - def adv_attr_accessor(name, deprecation=nil) - ivar = "@#{name}" - deprecation ||= "Please pass :#{name} as hash key to mail() instead" - - class_eval <<-ACCESSORS, __FILE__, __LINE__ + 1 - def #{name}=(value) - ActiveSupport::Deprecation.warn "#{name}= is deprecated. #{deprecation}" - #{ivar} = value - end - - def #{name}(*args) - raise ArgumentError, "expected 0 or 1 parameters" unless args.length <= 1 - if args.empty? - ActiveSupport::Deprecation.warn "#{name}() is deprecated and will be removed in future versions." - #{ivar} if instance_variable_names.include?(#{ivar.inspect}) - else - ActiveSupport::Deprecation.warn "#{name}(value) is deprecated. #{deprecation}" - #{ivar} = args.first - end - end - ACCESSORS - - self.protected_instance_variables << ivar if self.respond_to?(:protected_instance_variables) - end - end -end |