Module: Mail::CommonMessageId

Included in:
InReplyToField, MessageIdField, ReferencesField, ResentMessageIdField
Defined in:
lib/mail/fields/common/common_message_id.rb

Overview

:nodoc:

Instance Method Summary (collapse)

Instance Method Details

- (Object) default



24
25
26
27
28
29
30
31
# File 'lib/mail/fields/common/common_message_id.rb', line 24

def default
  return nil unless message_ids
  if message_ids.length == 1
    message_ids[0]
  else
    message_ids
  end
end

- (Object) element



4
5
6
# File 'lib/mail/fields/common/common_message_id.rb', line 4

def element
  @element ||= Mail::MessageIdsElement.new(value) unless value.blank?
end

- (Object) message_id



16
17
18
# File 'lib/mail/fields/common/common_message_id.rb', line 16

def message_id
  element.message_id if element
end

- (Object) message_ids



20
21
22
# File 'lib/mail/fields/common/common_message_id.rb', line 20

def message_ids
  element.message_ids if element
end

- (Object) parse(val = value)



8
9
10
11
12
13
14
# File 'lib/mail/fields/common/common_message_id.rb', line 8

def parse(val = value)
  unless val.blank?
    @element = Mail::MessageIdsElement.new(val)
  else
    nil
  end
end