Header Field classes

classes which represent a header field.


HeaderField

Super Class

Object

Class Methods

new( fname: String, fbody: String ) : HeaderField
create new HeaderField object. fname is the name of field, fbody is the body string of field. All sub classes of HeaderField can be created by this method.

Methods

name : duplicated String
name of this field. read only.
to_s( sep = "\n " ): String
returns encoded header field. When length of string is too long, use 'sep' string as separator.
inspect : String
returns decoded header field.
body : String
returns decoded field body.

StringH

Super Class

HeaderField

headers using this class

Methods

body, body=( bodi: String )
raw field body string

StructH

This is an abstract class which stands all "struct" header.

Super Class

HeaderField

Methods

comments
return Array of "comment".

UnknownH

Super Class

StructH

headers using this class

All headers which TMail can't know a way to parse.

Methods

body, body=( bodi: String )
field body (not parsed raw string)

DateH

Super Class

StructH

headers using this class

ClassMethods

DateH.t2s( time: Time ) : String
converts 'time' to RFC822 formatted string (MON DD YYYY HH:MM:SS [+/-]ZZZZ ).

Methods

date, date=( dat : Time )
Time object which represents the header's date and time. This object is preserved as local-time.

SaddrH

Super Class

StructH

headers using this class

Methods

addr, addr=( adr : MailAddr )
A Mbox or an AddrGroup.

MaddrH

Super Class

StructH

headers using this class

Methods

addrs : Array of MailAddr
returns an array, of Mbox or AddrGroup.

MsgidH

Super Class

StructH

headers using this class

Class Methods

MsgidH.msgid?( str : String )
If 'str' include Message-ID, return it. Else, return nil.

Methods

msgid, msgid=( str : String )
message-ID.

RefH

Super Class

StructH

headers using this class

Methods

refs : Array of String
returns an array of (Message-IDs and phrases).
each_msgid{|msgid| .... }
iteration for each message ID.
each_phrase{|phrase| .... }
iteration for each phrase.

RecvH

Super Class

StructH

headers using this class

Methods

from, from=( domain: String )
"from" string. This string must be domain formatted.
by, by=( domain: String )
"by" string. This string must be domain formatted.
via, via=( atom: String )
"via" string.
with
an array of "with" string.
_id, _id=( mid : String )
mail ID. 'mid' must be one word.
_for, _for=( fdom : Address )
string which stands "for" domain. This method is NOT 'for' because 'for' is the reserved word.
date, date=( dat : Time )
Time object which is written after ';' in header. 'dat' will be converted to local time.

EncH

Super Class

StructH

header using this class

Methods

encrypter, encrypter=( enc: String )
encrypter
keyword, keyword=( key: String )
keyword

VersionH

Super Class

StructH

header using this class

Methods

major, major=( maj: Integer )
major version (integer).
minor, minor=( min: Integer )
minor version (integer).

CTypeH

Super Class

StructH

headers using this class

Methods

main, main=( tipe: String )
main content type.
sub, sub=( tipe: String )
sub content type.
params : Hash
type specific parameters.

CEncodingH

Super Class

StructH

headers using this class

Methods

encoding, encoding=( enc: String )
content transfer encoding. Ordinary '7bit' '8bit' 'Base64' or else.

CDisposition

Super Class

StructH

Headers which use this class

Methods

disposition, disposition=( dis: String )
content disposition
params : Hash
parameters.

Association between a Field name and class

Field Name Class
Date DateH
Resent-Date DateH
Received RecvH
Return-Path SaddrH
Sender SaddrH
Resent-Sender SaddrH
To MaddrH
Cc MaddrH
Bcc MaddrH
From MaddrH
Reply-To MaddrH
Resent-To MaddrH
Resent-Cc MaddrH
Resent-Bcc MaddrH
Resent-From MaddrH
Resent-Reply-To MaddrH
Message-ID MsgidH
Resent-Message-ID MsgidH
In-Reply-To RefH
References RefH
Keywords KeyH
Encrypted EncH
Subject StringH
Comments StringH
MIME-Version VersionH
Content-Type CTypeH
Content-Transfer-Encoding CEncodingH
Content-ID MsgidH
Content-Description StringH

Copyright (c) 1998-2001 Minero Aoki <aamine@dp.u-netsurf.ne.jp>