Sha256: b86eb084d602c506549e49b0f5c5940ec16f04aaa24559afe60ab7a3bf9a72de
Contents?: true
Size: 564 Bytes
Versions: 16
Compression:
Stored size: 564 Bytes
Contents
# encoding: utf-8 # frozen_string_literal: true require 'mail/fields/named_structured_field' module Mail # keywords = "Keywords:" phrase *("," phrase) CRLF class KeywordsField < NamedStructuredField #:nodoc: NAME = 'Keywords' def element @element ||= PhraseList.new(value) end def keywords element.phrases end def default keywords end private def do_decode keywords.join(', ') end def do_encode "#{name}: #{keywords.join(",\r\n ")}\r\n" end end end
Version data entries
16 entries across 15 versions & 6 rubygems