Sha256: 8150a51e33cccbc81ae0bddf34dc628d907c5e1d5ebb5aa7b70f27f589e6a681

Contents?: true

Size: 428 Bytes

Versions: 52

Compression:

Stored size: 428 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)
      Encodings.register("x-uue", self)
    end
  end
end

Version data entries

52 entries across 41 versions & 12 rubygems

Version Path
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/mail-2.8.1/lib/mail/encodings/unix_to_unix.rb
cm-admin-1.5.22 vendor/bundle/ruby/3.3.0/gems/mail-2.8.1/lib/mail/encodings/unix_to_unix.rb
cm-admin-1.5.21 vendor/bundle/ruby/3.3.0/gems/mail-2.8.1/lib/mail/encodings/unix_to_unix.rb
cm-admin-1.5.20 vendor/bundle/ruby/3.3.0/gems/mail-2.8.1/lib/mail/encodings/unix_to_unix.rb
tinymce-rails-7.1.2 vendor/bundle/ruby/3.3.0/gems/mail-2.8.1/lib/mail/encodings/unix_to_unix.rb
scrapbook-0.3.2 vendor/ruby/2.7.0/gems/mail-2.7.1/lib/mail/encodings/unix_to_unix.rb
scrapbook-0.3.1 vendor/ruby/2.7.0/gems/mail-2.7.1/lib/mail/encodings/unix_to_unix.rb
mail-2.8.1 lib/mail/encodings/unix_to_unix.rb
mail-2.8.1.rc2 lib/mail/encodings/unix_to_unix.rb
mail-2.8.0.1 lib/mail/encodings/unix_to_unix.rb
mail-2.8.0.1.rc1 lib/mail/encodings/unix_to_unix.rb
mail-2.8.0 lib/mail/encodings/unix_to_unix.rb
mail-2.8.0.rc3 lib/mail/encodings/unix_to_unix.rb
mail-2.8.0.rc2 lib/mail/encodings/unix_to_unix.rb
tdiary-5.2.4 vendor/bundle/ruby/3.1.0/gems/mail-2.7.1/lib/mail/encodings/unix_to_unix.rb
tdiary-5.2.3 vendor/bundle/ruby/3.1.0/gems/mail-2.7.1/lib/mail/encodings/unix_to_unix.rb
tdiary-5.2.2 vendor/bundle/ruby/3.1.0/gems/mail-2.7.1/lib/mail/encodings/unix_to_unix.rb
mail-2.8.0.rc1 lib/mail/encodings/unix_to_unix.rb
tdiary-5.2.1 vendor/bundle/ruby/3.1.0/gems/mail-2.7.1/lib/mail/encodings/unix_to_unix.rb
tdiary-5.2.0 vendor/bundle/ruby/3.0.0/gems/mail-2.7.1/lib/mail/encodings/unix_to_unix.rb