Sha256: 00e052e6e9991a426a519839402bb16b7bb77d59fc02ade59c0dcd846fe3b21f

Contents?: true

Size: 388 Bytes

Versions: 10

Compression:

Stored size: 388 Bytes

Contents

# frozen_string_literal: true
module Mail
  module Encodings
    class UnixToUnix < TransferEncoding
      NAME = "x-uuencode"

      def self.decode(str)
        str.sub(/\Abegin \d+ [^\n]*\n/, '').unpack('u').first
      end

      def self.encode(str)
        [str].pack("u")
      end

      Encodings.register(NAME, self)
      Encodings.register("uuencode", self)
    end
  end
end

Version data entries

10 entries across 8 versions & 2 rubygems

Version Path
tdiary-5.0.11 vendor/bundle/gems/mail-2.7.0/lib/mail/encodings/unix_to_unix.rb
tdiary-5.0.9 vendor/bundle/gems/mail-2.7.0/lib/mail/encodings/unix_to_unix.rb
tdiary-5.0.8 vendor/bundle/gems/mail-2.7.0/lib/mail/encodings/unix_to_unix.rb
tdiary-5.0.8 vendor/bundle/ruby/2.5.0/gems/mail-2.7.0/lib/mail/encodings/unix_to_unix.rb
tdiary-5.0.8 vendor/bundle/gems/tdiary-5.0.7/vendor/bundle/gems/mail-2.7.0/lib/mail/encodings/unix_to_unix.rb
mail-2.7.1.rc1 lib/mail/encodings/unix_to_unix.rb
tdiary-5.0.7 vendor/bundle/gems/mail-2.7.0/lib/mail/encodings/unix_to_unix.rb
mail-2.7.0 lib/mail/encodings/unix_to_unix.rb
mail-2.7.0.rc3 lib/mail/encodings/unix_to_unix.rb
mail-2.7.0.rc2 lib/mail/encodings/unix_to_unix.rb