123456789_123456789_123456789_123456789_123456789_

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

Instance Attribute Summary

Instance Method Summary

Constructor Details

.new(address, parameter, ...) ⇒ Address

address String or Address parameter String or Hash

[ GitHub ]

  
# File 'lib/net/smtp.rb', line 1141

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]

[ GitHub ]

  
# File 'lib/net/smtp.rb', line 1132

attr_reader :address

#parameters (readonly)

parameters [Array<String>]

[ GitHub ]

  
# File 'lib/net/smtp.rb', line 1134

attr_reader :parameters

Instance Method Details

#to_s

[ GitHub ]

  
# File 'lib/net/smtp.rb', line 1152

def to_s
  @address
end