Class: Mail::StructuredField
- Inherits:
-
Object
- Object
- Mail::StructuredField
- Includes:
- CommonField, Utilities
- Defined in:
- lib/mail/fields/structured_field.rb
Overview
Provides access to a structured header field
Per RFC 2822:
2.2.2. Structured Header Field Bodies
Some field bodies in this standard have specific syntactical
structure more restrictive than the unstructured field bodies
described above. These are referred to as "structured" field bodies.
Structured field bodies are sequences of specific lexical tokens as
described in sections 3 and 4 of this standard. Many of these tokens
are allowed (according to their syntax) to be introduced or end with
comments (as described in section 3.2.3) as well as the space (SP,
ASCII value 32) and horizontal tab (HTAB, ASCII value 9) characters
(together known as the white space characters, WSP), and those WSP
characters are subject to header "folding" and "unfolding" as
described in section 2.2.3. Semantic analysis of structured field
bodies is given along with their syntax.
Direct Known Subclasses
BccField, CcField, ContentDispositionField, ContentIdField, ContentLocationField, ContentTransferEncodingField, ContentTypeField, DateField, Envelope, FromField, InReplyToField, KeywordsField, MessageIdField, MimeVersionField, ReceivedField, ReferencesField, ReplyToField, ResentBccField, ResentCcField, ResentDateField, ResentFromField, ResentMessageIdField, ResentSenderField, ResentToField, ReturnPathField, SenderField, ToField
Instance Method Summary collapse
- #default ⇒ Object
-
#initialize(*args) ⇒ StructuredField
constructor
A new instance of StructuredField.
Methods included from Utilities
Methods included from CommonField
Constructor Details
#initialize(*args) ⇒ StructuredField
Returns a new instance of StructuredField.
25 26 27 28 29 |
# File 'lib/mail/fields/structured_field.rb', line 25 def initialize(*args) self.name = args.first self.value = args.last self end |
Instance Method Details
#default ⇒ Object
31 32 33 |
# File 'lib/mail/fields/structured_field.rb', line 31 def default decoded end |