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
parameters [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 1116
def initialize(address, *args, **kw_args) if address.kind_of? Address @address = address.address @parameters = address.parameters else @address = address @parameters = [] end @parameters = (parameters + args + [kw_args]).map{|param| Array(param)}.flatten(1).map{|param| Array(param).compact.join('=')}.uniq end
Instance Attribute Details
#address (readonly)
mail address [String]
# File 'lib/net/smtp.rb', line 1107
attr_reader :address
#parameters (readonly)
parameters [Array<String>]
# File 'lib/net/smtp.rb', line 1109
attr_reader :parameters
Instance Method Details
#to_s
[ GitHub ]# File 'lib/net/smtp.rb', line 1127
def to_s @address end