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 89
89:     def self.decode( str, encoding = nil )
90:       encoding ||= (OUTPUT_ENCODING[$KCODE] || 'j')
91:       opt = '-m' + encoding
92:       str.gsub(ENCODED_WORDS) {|s| NKF.nkf(opt, s) }
93:     end
new( dest, encoding = nil, eol = "\n" )
    # File lib/action_mailer/vendor/tmail/encode.rb, line 95
95:     def initialize( dest, encoding = nil, eol = "\n" )
96:       @f = StrategyInterface.create_dest(dest)
97:       @encoding = (/\A[ejs]/ === encoding) ? encoding[0,1] : nil
98:       @eol = eol
99:     end
Public Instance methods
header_body( str )
     # File lib/action_mailer/vendor/tmail/encode.rb, line 117
117:     def header_body( str )
118:       @f << decode(str)
119:     end
header_line( str )
     # File lib/action_mailer/vendor/tmail/encode.rb, line 109
109:     def header_line( str )
110:       @f << decode(str)
111:     end
header_name( nm )
     # File lib/action_mailer/vendor/tmail/encode.rb, line 113
113:     def header_name( nm )
114:       @f << nm << ': '
115:     end
kv_pair( k, v )
     # File lib/action_mailer/vendor/tmail/encode.rb, line 143
143:     def kv_pair( k, v )
144:       @f << k << '=' << v
145:     end
lwsp( str )
     # File lib/action_mailer/vendor/tmail/encode.rb, line 127
127:     def lwsp( str )
128:       @f << str
129:     end
meta( str )
     # File lib/action_mailer/vendor/tmail/encode.rb, line 131
131:     def meta( str )
132:       @f << str
133:     end
phrase( str )
     # File lib/action_mailer/vendor/tmail/encode.rb, line 139
139:     def phrase( str )
140:       @f << quote_phrase(decode(str))
141:     end
puts( str = nil )
     # File lib/action_mailer/vendor/tmail/encode.rb, line 147
147:     def puts( str = nil )
148:       @f << str if str
149:       @f << @eol
150:     end
space()
This method is also aliased as spc
     # File lib/action_mailer/vendor/tmail/encode.rb, line 121
121:     def space
122:       @f << ' '
123:     end
spc()

Alias for space

terminate()
     # File lib/action_mailer/vendor/tmail/encode.rb, line 106
106:     def terminate
107:     end
text( str )
     # File lib/action_mailer/vendor/tmail/encode.rb, line 135
135:     def text( str )
136:       @f << decode(str)
137:     end
write( str )
     # File lib/action_mailer/vendor/tmail/encode.rb, line 152
152:     def write( str )
153:       @f << str
154:     end
Private Instance methods
decode( str )
     # File lib/action_mailer/vendor/tmail/encode.rb, line 101
101:     def decode( str )
102:       self.class.decode(str, @encoding)
103:     end