Sha256: 6f5c6478f4ab19bb83f1662c6903693f526db8cc47983f3a9534def8adc2530f
Contents?: true
Size: 736 Bytes
Versions: 16
Compression:
Stored size: 736 Bytes
Contents
# encoding: utf-8 # frozen_string_literal: true require 'mail/fields/named_structured_field' require 'mail/utilities' module Mail class MimeVersionField < NamedStructuredField #:nodoc: NAME = 'Mime-Version' def self.singular? true end def initialize(value = nil, charset = nil) value = '1.0' if Utilities.blank?(value) super value, charset end def element @element ||= Mail::MimeVersionElement.new(value) end def version "#{element.major}.#{element.minor}" end def major element.major.to_i end def minor element.minor.to_i end def encoded "#{name}: #{version}\r\n" end def decoded version end end end
Version data entries
16 entries across 15 versions & 6 rubygems