Class: Mail::Encodings::Binary

Inherits:
TransferEncoding show all
Defined in:
lib/mail/encodings/binary.rb

Direct Known Subclasses

EightBit

Constant Summary

NAME =
'binary'
PRIORITY =
5

Class Method Summary collapse

Methods inherited from TransferEncoding

can_encode?, can_transport?, compatible_input?, get_best_compatible, to_s, #to_s

Class Method Details

.cost(str) ⇒ Object

Idenity encodings have a fixed cost, 1 byte out per 1 byte in



25
26
27
# File 'lib/mail/encodings/binary.rb', line 25

def self.cost(str)
  1.0
end

.decode(str) ⇒ Object

Decode the string



15
16
17
# File 'lib/mail/encodings/binary.rb', line 15

def self.decode(str)
  str
end

.encode(str) ⇒ Object

Encode the string



20
21
22
# File 'lib/mail/encodings/binary.rb', line 20

def self.encode(str)
  str
end