class Net::SMTP::Address - net-smtp: Ruby Standard Library Documentation

# class Net::SMTP::Address

`Address` with parametres for MAIL or RCPT command

### Attributes

address[R]

mail address [String]

parameters[R]

parameters [Array<String>]

### Public Class Methods

initialize(address, parameter, ...) click to toggle source

address `String` or `Net::SMTP::Address` parameter `String` or `Hash`

    # File net-smtp-0.5.0/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

### Public Instance Methods

to_s() click to toggle source

    # File net-smtp-0.5.0/lib/net/smtp.rb, line 1152
    def to_s
      @address
    end