Sha256: cd735b46d6c381b93a2827e141494e874c8d36aa699d648a48e56f8b2e8d68ac
Contents?: true
Size: 586 Bytes
Versions: 14
Compression:
Stored size: 586 Bytes
Contents
# encoding: utf-8 # frozen_string_literal: true require 'mail/parsers/message_ids_parser' require 'mail/utilities' module Mail class MessageIdsElement #:nodoc: def self.parse(string) new(string).tap(&:message_ids) end attr_reader :message_ids def initialize(string) @message_ids = parse(string) end def message_id message_ids.first end private def parse(string) if Utilities.blank? string [] else Mail::Parsers::MessageIdsParser.parse(string).message_ids end end end end
Version data entries
14 entries across 14 versions & 5 rubygems