Sha256: 56c9e8b3618203da5e23d3a53c46efc386dbeb8f7f54c5782ff72814eb0b3f64
Contents?: true
Size: 634 Bytes
Versions: 130
Compression:
Stored size: 634 Bytes
Contents
# encoding: utf-8 module Mail class MessageIdsElement include Mail::Utilities def initialize(string) parser = Mail::MessageIdsParser.new if tree = parser.parse(string) @message_ids = tree.message_ids.map { |msg_id| clean_msg_id(msg_id.text_value) } else raise Mail::Field::ParseError, "MessageIdsElement can not parse |#{string}|\nReason was: #{parser.failure_reason}\n" end end def message_ids @message_ids end def message_id @message_ids.first end def clean_msg_id( val ) val =~ /.*<(.*)>.*/ ; $1 end end end
Version data entries
130 entries across 100 versions & 6 rubygems