Sha256: 2284947d1d5ecb03ccb09d205dabe2b1413d9bddac1b3ad98011b597f59f9d67
Contents?: true
Size: 763 Bytes
Versions: 69
Compression:
Stored size: 763 Bytes
Contents
# encoding: utf-8 module Mail module CommonMessageId # :nodoc: def element @element ||= Mail::MessageIdsElement.new(value) end def parse(val = value) unless val.blank? @element = Mail::MessageIdsElement.new(val) else nil end end def message_id element.message_id end def message_ids element.message_ids end def default if message_ids.length == 1 message_ids[0] else message_ids end end private def do_encode(field_name) %Q{#{field_name}: #{message_ids.map { |m| "<#{m}>" }.join(', ')}\r\n} end def do_decode "#{message_ids.map { |m| "<#{m}>" }.join(', ')}" end end end
Version data entries
69 entries across 39 versions & 3 rubygems