MIME B encoding decoder

Methods
Included Modules
Constants
ENCODED_WORDS = /#{encoded}(?:\s+#{encoded})*/i
OUTPUT_ENCODING = { 'EUC' => 'e', 'SJIS' => 's', }
Public Class methods
decode( str, encoding = nil )
    # File lib/action_mailer/vendor/tmail/encode.rb, line 70
70:     def self.decode( str, encoding = nil )
71:       encoding ||= (OUTPUT_ENCODING[$KCODE] || 'j')
72:       opt = '-m' + encoding
73:       str.gsub(ENCODED_WORDS) {|s| NKF.nkf(opt, s) }
74:     end
new( dest, encoding = nil, eol = "\n" )
    # File lib/action_mailer/vendor/tmail/encode.rb, line 76
76:     def initialize( dest, encoding = nil, eol = "\n" )
77:       @f = StrategyInterface.create_dest(dest)
78:       @encoding = (/\A[ejs]/ === encoding) ? encoding[0,1] : nil
79:       @eol = eol
80:     end
Public Instance methods
header_body( str )
     # File lib/action_mailer/vendor/tmail/encode.rb, line 98
 98:     def header_body( str )
 99:       @f << decode(str)
100:     end
header_line( str )
    # File lib/action_mailer/vendor/tmail/encode.rb, line 90
90:     def header_line( str )
91:       @f << decode(str)
92:     end
header_name( nm )
    # File lib/action_mailer/vendor/tmail/encode.rb, line 94
94:     def header_name( nm )
95:       @f << nm << ': '
96:     end
kv_pair( k, v )
     # File lib/action_mailer/vendor/tmail/encode.rb, line 124
124:     def kv_pair( k, v )
125:       @f << k << '=' << v
126:     end
lwsp( str )
     # File lib/action_mailer/vendor/tmail/encode.rb, line 108
108:     def lwsp( str )
109:       @f << str
110:     end
meta( str )
     # File lib/action_mailer/vendor/tmail/encode.rb, line 112
112:     def meta( str )
113:       @f << str
114:     end
phrase( str )
     # File lib/action_mailer/vendor/tmail/encode.rb, line 120
120:     def phrase( str )
121:       @f << quote_phrase(decode(str))
122:     end
puts( str = nil )
     # File lib/action_mailer/vendor/tmail/encode.rb, line 128
128:     def puts( str = nil )
129:       @f << str if str
130:       @f << @eol
131:     end
space()
This method is also aliased as spc
     # File lib/action_mailer/vendor/tmail/encode.rb, line 102
102:     def space
103:       @f << ' '
104:     end
spc()

Alias for space

terminate()
    # File lib/action_mailer/vendor/tmail/encode.rb, line 87
87:     def terminate
88:     end
text( str )
     # File lib/action_mailer/vendor/tmail/encode.rb, line 116
116:     def text( str )
117:       @f << decode(str)
118:     end
write( str )
     # File lib/action_mailer/vendor/tmail/encode.rb, line 133
133:     def write( str )
134:       @f << str
135:     end
Private Instance methods
decode( str )
    # File lib/action_mailer/vendor/tmail/encode.rb, line 82
82:     def decode( str )
83:       self.class.decode(str, @encoding)
84:     end