diff options
author | tenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-12-22 23:13:49 +0000 |
---|---|---|
committer | tenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-12-22 23:13:49 +0000 |
commit | 0a2392a50aaffcb751aaf9ba1f0d5dccab6a6206 (patch) | |
tree | 717685efd97cb46682e53598a71122c8d66e838b /lib/net/smtp.rb | |
parent | df8e7db7c5f296df63db09e2b041336f0a8c6452 (diff) | |
download | ruby-0a2392a50aaffcb751aaf9ba1f0d5dccab6a6206.tar.gz |
* lib/net/smtp.rb: refactoring Net::SMTP#esmtp= to use an
attr_accessor
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30296 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/net/smtp.rb')
-rw-r--r-- | lib/net/smtp.rb | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/lib/net/smtp.rb b/lib/net/smtp.rb index 1143def104..c066bacbe4 100644 --- a/lib/net/smtp.rb +++ b/lib/net/smtp.rb @@ -229,11 +229,6 @@ module Net "#<#{self.class} #{@address}:#{@port} started=#{@started}>" end - # +true+ if the SMTP object uses ESMTP (which it does by default). - def esmtp? - @esmtp - end - # # Set whether to use ESMTP or not. This should be done before # calling #start. Note that if #start is called in ESMTP mode, @@ -241,11 +236,10 @@ module Net # object will automatically switch to plain SMTP mode and # retry (but not vice versa). # - def esmtp=(bool) - @esmtp = bool - end + attr_accessor :esmtp - alias esmtp esmtp? + # +true+ if the SMTP object uses ESMTP (which it does by default). + alias :esmtp? :esmtp # true if server advertises STARTTLS. # You cannot get valid value before opening SMTP session. |