Class: Net::SMTP::Authenticator
Relationships & Source Files | |
Extension / Inclusion / Inheritance Descendants | |
Subclasses:
|
|
Inherits: | Object |
Defined in: | lib/net/smtp/authenticator.rb |
Class Method Summary
Instance Attribute Summary
- #smtp readonly
Instance Method Summary
Constructor Details
.new(smtp) ⇒ Authenticator
Class Method Details
.auth_class(type)
[ GitHub ]# File 'lib/net/smtp/authenticator.rb', line 12
def self.auth_class(type) Authenticator.auth_classes[type.intern] end
.auth_classes
[ GitHub ]# File 'lib/net/smtp/authenticator.rb', line 4
def self.auth_classes @classes ||= {} end
.auth_type(type)
[ GitHub ]# File 'lib/net/smtp/authenticator.rb', line 8
def self.auth_type(type) Authenticator.auth_classes[type] = self end
Instance Attribute Details
#smtp (readonly)
[ GitHub ]# File 'lib/net/smtp/authenticator.rb', line 16
attr_reader :smtp
Instance Method Details
#base64_encode(str) ⇒ String
# File 'lib/net/smtp/authenticator.rb', line 40
def base64_encode(str) # expects "str" may not become too long [str].pack('m0') end
#continue(arg) ⇒ String
# File 'lib/net/smtp/authenticator.rb', line 24
def continue(arg) res = smtp.get_response arg raise res.exception_class.new(res) unless res.continue? res.string.split[1] end
#finish(arg) ⇒ Net::SMTP::Response
# File 'lib/net/smtp/authenticator.rb', line 32
def finish(arg) res = smtp.get_response arg raise SMTPAuthenticationError.new(res) unless res.success? res end