Class: Mail::Encodings::EightBit
- Inherits:
-
Binary
- Object
- TransferEncoding
- Binary
- Mail::Encodings::EightBit
- Defined in:
- lib/mail/encodings/8bit.rb
Direct Known Subclasses
Constant Summary collapse
- NAME =
'8bit'
- PRIORITY =
4
Class Method Summary collapse
-
.cost(str) ⇒ Object
Idenity encodings have a fixed cost, 1 byte out per 1 byte in.
-
.decode(str) ⇒ Object
Decode the string.
-
.encode(str) ⇒ Object
Encode the string.
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/8bit.rb', line 24 def self.cost(str) 1.0 end |
.decode(str) ⇒ Object
Decode the string
14 15 16 |
# File 'lib/mail/encodings/8bit.rb', line 14 def self.decode(str) str.to_lf end |
.encode(str) ⇒ Object
Encode the string
19 20 21 |
# File 'lib/mail/encodings/8bit.rb', line 19 def self.encode(str) str.to_crlf end |