Class: Mail::Encodings::Binary

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

Direct Known Subclasses

EightBit

Constant Summary collapse

NAME =
'binary'
PRIORITY =
5

Class Method Summary collapse

Methods inherited from TransferEncoding

can_encode?, can_transport?, 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



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

def self.cost(str)
  1.0
end

.decode(str) ⇒ Object

Decode the string



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

def self.decode(str)
  str
end

.encode(str) ⇒ Object

Encode the string



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

def self.encode(str)
  str
end