Sha256: b7a35d12eea68fe0e3fe051df25b97e2ca74db419e329e05b899ac664c4e5b9c

Contents?: true

Size: 476 Bytes

Versions: 63

Compression:

Stored size: 476 Bytes

Contents

# encoding: utf-8
# frozen_string_literal: true
require 'mail/encodings/transfer_encoding'

module Mail
  module Encodings
    # Identity encodings do no encoding/decoding and have a fixed cost:
    # 1 byte in -> 1 byte out.
    class Identity < TransferEncoding #:nodoc:
      def self.decode(str)
        str
      end

      def self.encode(str)
        str
      end

      # 1 output byte per input byte.
      def self.cost(str)
        1.0
      end
    end
  end
end

Version data entries

63 entries across 49 versions & 13 rubygems

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