File: optional_field.rb

package info (click to toggle)
ruby-mail 2.7.1%2Bdfsg1-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 5,732 kB
  • sloc: ruby: 71,628; makefile: 3
file content (17 lines) | stat: -rw-r--r-- 418 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# encoding: utf-8
# frozen_string_literal: true
# 
#    The field names of any optional-field MUST NOT be identical to any
#    field name specified elsewhere in this standard.
# 
# optional-field  =       field-name ":" unstructured CRLF
require 'mail/fields/unstructured_field'

module Mail
  class OptionalField < UnstructuredField
    private
      def do_encode
        "#{wrapped_value}\r\n"
      end
  end
end