Sha256: ef48953bfe3a0bc61d9cdaae7ca3fe1426ae7fa8e9bd4a015f0a36ba54d17233

Contents?: true

Size: 575 Bytes

Versions: 241

Compression:

Stored size: 575 Bytes

Contents

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

module Mail
  module Encodings
    class Binary < TransferEncoding
      NAME = 'binary'

      PRIORITY = 5

      # Binary is an identiy encoding, meaning nothing to do
      
      # Decode the string
      def self.decode(str)
        str
      end
    
      # Encode the string
      def self.encode(str)
        str
      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

241 entries across 198 versions & 23 rubygems

Version Path
depengine-0.0.11 etc/isolate/jruby-1.8/gems/mail-2.2.5/lib/mail/encodings/binary.rb
fc-webicons-0.0.3 vendor/bundle/ruby/1.9.1/gems/mail-2.5.3/lib/mail/encodings/binary.rb
fc-webicons-0.0.2 vendor/bundle/ruby/1.9.1/gems/mail-2.5.3/lib/mail/encodings/binary.rb
fc-webicons-0.0.1 vendor/bundle/ruby/1.9.1/gems/mail-2.5.3/lib/mail/encodings/binary.rb
depengine-0.0.10 etc/isolate/jruby-1.8/gems/mail-2.2.5/lib/mail/encodings/binary.rb
depengine-0.0.10 etc/isolate/ruby-1.8/gems/mail-2.2.5/lib/mail/encodings/binary.rb
depengine-0.0.9 etc/isolate/jruby-1.8/gems/mail-2.2.5/lib/mail/encodings/binary.rb
depengine-0.0.9 etc/isolate/ruby-1.8/gems/mail-2.2.5/lib/mail/encodings/binary.rb
active_mailer-0.0.5 test/fixtures/dummyapp_rails_3.2/vendor/bundle/ruby/1.9.1/gems/mail-2.4.4/lib/mail/encodings/binary.rb
depengine-0.0.8 etc/isolate/ruby-1.8/gems/mail-2.2.5/lib/mail/encodings/binary.rb
depengine-0.0.8 etc/isolate/jruby-1.8/gems/mail-2.2.5/lib/mail/encodings/binary.rb
depengine-0.0.7 etc/isolate/jruby-1.8/gems/mail-2.2.5/lib/mail/encodings/binary.rb
depengine-0.0.7 etc/isolate/ruby-1.8/gems/mail-2.2.5/lib/mail/encodings/binary.rb
depengine-0.0.5 etc/isolate/jruby-1.8/gems/mail-2.2.5/lib/mail/encodings/binary.rb
depengine-0.0.5 etc/isolate/ruby-1.8/gems/mail-2.2.5/lib/mail/encodings/binary.rb
depengine-0.0.4 etc/isolate/jruby-1.8/gems/mail-2.2.5/lib/mail/encodings/binary.rb
depengine-0.0.4 etc/isolate/ruby-1.8/gems/mail-2.2.5/lib/mail/encodings/binary.rb
depengine-0.0.3 etc/isolate/ruby-1.8/gems/mail-2.2.5/lib/mail/encodings/binary.rb
depengine-0.0.3 etc/isolate/jruby-1.8/gems/mail-2.2.5/lib/mail/encodings/binary.rb
depengine-0.0.2 etc/isolate/ruby-1.8/gems/mail-2.2.5/lib/mail/encodings/binary.rb