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 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]

[ GitHub ]

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

attr_reader :address

#parameters (readonly)

parameters [Array<String>]

[ GitHub ]

  
# 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