Class: Net::SMTP::Address
Relationships & Source Files | |
Inherits: | Object |
Defined in: | lib/net/smtp.rb |
Overview
Address
with parametres for MAIL or RCPT command
Class Method Summary
-
.new(address, parameter, ...) ⇒ Address
constructor
address
String
orAddress
parameterString
orHash
Instance Attribute Summary
-
#address
readonly
mail address [String].
-
#parameters
readonly
paramters [Array<String>].
Instance Method Summary
Constructor Details
.new(address, parameter, ...) ⇒ Address
address String
or Address
parameter String
or Hash
# File 'lib/net/smtp.rb', line 1176
def initialize(address, *args, **kw_args) if address.kind_of? Address @address = address.address @parameters = address.parameters else @address = address @parameters = (args + [kw_args]).map{|param| Array(param)}.flatten(1).map{|param| Array(param).compact.join('=')} end end
Instance Attribute Details
#address (readonly)
mail address [String]
# File 'lib/net/smtp.rb', line 1167
attr_reader :address
#parameters (readonly)
paramters [Array<String>]
# File 'lib/net/smtp.rb', line 1169
attr_reader :parameters
Instance Method Details
#to_s
[ GitHub ]# File 'lib/net/smtp.rb', line 1186
def to_s @address end