class TMail::Address parse(str) -> TMail::Address | TMail::AddressGroup
str: String
parses the string and creates a new TMail::Address object.
If the string does not follow the standard internet address format, a
TMail::SyntaxError exception is raised.
new(locals, domains) -> TMail::Address | TMail::AddressGroup
locals: [String]
domains: [String]
creates a new TMail::Address object consisting of the local part,
LOCALS and domain part domains.
address_group? -> true | falsereturns false.
spec -> Stringan address spec ("....@....").
routes -> [String]delivery routes. Strings do not include character "@".
name -> Stringphrase -> Stringshort description for this address (e.g. real name).
encoded(eol = "\r\n", encoding = 'j') -> String
eol: String
encoding: String
converts this object into MIME-encoded string.
to_s(eol = "\n", encoding = 'e') -> Stringdecoded(eol = "\n", encoding = 'e') -> String
eol: String
encoding: String
converts this object into decoded string.
==(other) -> true | false
other: Object
judge if self equals to other by inspecting addr-spec string (#spec). #name and #routes never affects the return value.
class TMail::AddressGroup new(name, addrs) -> TMail::AddressGroup
name: String
addrs: [TMail::Address | TMail::AddressGroup]
creates new TMail::AddressGroup object.
NAME is the name of this group, addrs is addresses
which belongs to this group.
address_group? -> true | falsereturns true.
name -> Stringthe human readable name of this group.
addresses -> [TMail::Address | TMail::AddressGroup]addresses which belongs to this group.
to_a -> [TMail::Address | TMail::AddressGroup]to_ary -> [TMail::Address | TMail::AddressGroup]
equals to addresses.dup.
flatten -> [TMail::Address]
flatten this group into one level of array of TMail::Address.
add(addr)push(addr)
addr: TMail::Address | TMail::AddressGroup
adds an address or an address group to this group.
delete(addr)
addr: TMail::Address | TMail::AddressGroup
removes ADDR from this group.
each {|a| .... }
a: TMail::Address | TMail::AddressGroup
equals to addresses.each {|a| .... }.
each_address {|a| .... }
equals to flatten.each {|a| .... }
encoded(eol = "\r\n", encoding = 'j') -> String
eol: String
encoding: String
converts this object into MIME-encoded string.
decoded(eol = "\n", encoding = 'e') -> String
eol: String
encoding: String
converts this object into decoded string.
==(other) -> true | falseeql?(other) -> true | false
other: Object
judges if self is equal to OTHER, by comparing self.addresses and
other.addresses. (self.name is meanless)