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

[ GitHub ]

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

attr_reader :address

#parameters (readonly)

paramters [Array<String>]

[ GitHub ]

  
# 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