Class: Mail::MessageIdField
- Inherits:
-
CommonMessageIdField
- Object
- CommonField
- StructuredField
- NamedStructuredField
- CommonMessageIdField
- Mail::MessageIdField
- Defined in:
- lib/mail/fields/message_id_field.rb
Overview
Only one Message-ID field may appear in a header.
Note that parsed Message IDs do not contain their enclosing angle brackets which, per RFC, are not part of the ID.
mail = Mail.new
mail. = '<[email protected]>'
mail. #=> '<[email protected]>'
mail[:message_id] #=> '#<Mail::Field:0x180e5e8 @field=#<Mail::MessageIdField:0x180e1c4
mail['message_id'] #=> '#<Mail::Field:0x180e5e8 @field=#<Mail::MessageIdField:0x180e1c4
mail['Message-ID'] #=> '#<Mail::Field:0x180e5e8 @field=#<Mail::MessageIdField:0x180e1c4
mail[:message_id]. #=> '[email protected]'
mail[:message_id]. #=> ['[email protected]']
Constant Summary collapse
- NAME =
:nodoc:
'Message-ID'
Instance Attribute Summary
Attributes inherited from CommonField
#charset, #errors, #name, #value
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(value = nil, charset = nil) ⇒ MessageIdField
constructor
A new instance of MessageIdField.
- #message_ids ⇒ Object
Methods inherited from CommonMessageIdField
#default, #element, #message_id, #to_s
Methods inherited from CommonField
#decoded, #default, #element, #encoded, #parse, parse, #responsible_for?, #singular?, #to_s
Constructor Details
#initialize(value = nil, charset = nil) ⇒ MessageIdField
Returns a new instance of MessageIdField.
27 28 29 30 |
# File 'lib/mail/fields/message_id_field.rb', line 27 def initialize(value = nil, charset = nil) value = Mail::Utilities. if Utilities.blank?(value) super value, charset end |
Class Method Details
.singular? ⇒ Boolean
23 24 25 |
# File 'lib/mail/fields/message_id_field.rb', line 23 def self.singular? true end |
Instance Method Details
#message_ids ⇒ Object
32 33 34 |
# File 'lib/mail/fields/message_id_field.rb', line 32 def [] end |