Sha256: 704075a708d333a0fcf4a43a84a2f756f20641f9a579b48814ba4303c8dca63f

Contents?: true

Size: 533 Bytes

Versions: 1

Compression:

Stored size: 533 Bytes

Contents

# encoding: utf-8
module Mail
  module Encodings
    class EightBit < Binary
      NAME = '8bit'

      PRIORITY = 4

      # 8bit is an identiy encoding, meaning nothing to do
      
      # Decode the string
      def self.decode(str)
        str.to_lf
      end
    
      # Encode the string
      def self.encode(str)
        str.to_crlf
      end
     
      # Idenity encodings have a fixed cost, 1 byte out per 1 byte in
      def self.cost(str)
        1.0
      end

      Encodings.register(NAME, self) 
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mail-2.1.5 lib/mail/encodings/8bit.rb