Google

Address Classes

class TMail::Address

Class Methods

parse( str: String ) -> TMail::Address/TMail::AddressGroup

parses str and creates new TMail::Address object. If str did not follow the internet address format, TMail::SyntaxError exception is raised.

new( locals: Array of String, domains : Array of String )

creates new TMail::Address object consist from local part locals and domain part domains.

Instance Methods

address_group?

returns false.

spec -> String

an address spec ("....@....").

routes -> Array of String

delivery routes. Strings do not include character "@".

name -> String
phrase -> String

short description for this address (e.g. real name).

encoded( eol = "\r\n", encoding = 'j' ) -> String

converts this object into MIME-encoded string.

to_s( eol = "\n", encoding = 'e' ) -> String
decoded( eol = "\n", encoding = 'e' ) -> String

converts this object into decoded string.

==( other ) -> bool

judge if self equals to other by inspecting addr-spec string (#spec). #name and #routes never affects the return value.

class TMail::AddressGroup

Class Methods

new( name: String, addrs: Array of TMail::Address/TMail::AddressGroup ) -> TMail::AddressGroup

creates new TMail::AddressGroup object. name is the name of this group, addrs is addresses which belongs to this group.

Instance Methods

address_group?

returns true.

name -> String

the (human readable) name of this group.

addresses -> Array of TMail::Address/TMail::AddressGroup

addresses which belongs to this group.

to_a -> Array of TMail::Address/TMail::AddressGroup
to_ary -> Array of TMail::Address/TMail::AddressGroup

equals to addresses.dup.

flatten -> Array of TMail::Address

flatten this group into one level of array of TMail::Address.

add( a: Array of TMail::Address/TMail::AddressGroup )
push( a: Array of TMail::Address/TMail::AddressGroup )

adds an address or an group to this group.

delete( addr: Array of TMail::Address/TMail::AddressGroup )

removes addr from this group.

each {|a| .... }

equals to addresses.each {|a| .... }.

each_address {|a| .... }

equals to flatten.each {|a| .... }

encoded( eol = "\r\n", encoding = 'j' ) -> String

converts this object into MIME-encoded string.

decoded( eol = "\n", encoding = 'e' ) -> String

converts this object into decoded string.

==( other )
eql?( other )

judges if self is equal to other, by comparing self.addresses and other.addresses. (self.name is meanless)