Module: Mail::CommonMessageId::InstanceMethods

Defined in:
lib/mail/fields/common/common_message_id.rb

Overview

:doc:

Instance Method Summary collapse

Instance Method Details

#defaultObject



31
32
33
34
35
36
37
# File 'lib/mail/fields/common/common_message_id.rb', line 31

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

#elementObject



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

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

#message_idObject



23
24
25
# File 'lib/mail/fields/common/common_message_id.rb', line 23

def message_id
  element.message_id
end

#message_idsObject



27
28
29
# File 'lib/mail/fields/common/common_message_id.rb', line 27

def message_ids
  element.message_ids
end

#parse(val = value) ⇒ Object



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

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