class Mail::SubjectField
for subject
Public Instance Methods
decode_b_value_for_mobile(str)
click to toggle source
# File lib/jpmobile/mail.rb, line 472 def decode_b_value_for_mobile(str) match = str.match(/\=\?(.+)?\?[Bb]\?(.*)\?\=/m) if match charset = match[1] str = Ruby19.decode_base64(match[2]) @mobile.decode_transfer_encoding(str, charset) else str end end
decoded_with_jpmobile()
click to toggle source
# File lib/jpmobile/mail.rb, line 449 def decoded_with_jpmobile if @mobile return value unless value =~ /\=\?[^?]+\?([QB])\?[^?]*?\?\=/mi Encodings.collapse_adjacent_encodings(value).each do |line| line.gsub!(/\=\?[^?]+\?([QB])\?[^?]*?\?\=/mi) do |string| case $1 when 'B','b' then decode_b_value_for_mobile(string) when 'Q','q' then Encodings.q_value_decode(string) else line end end end.join("") else decoded_without_jpmobile end end
Also aliased as: decoded
encoded_with_jpmobile()
click to toggle source
# File lib/jpmobile/mail.rb, line 436 def encoded_with_jpmobile if @mobile if @mobile.to_mail_subject_encoded?(value) "#{name}: #{value}\r\n" else # convert encoding "#{name}: " + @mobile.to_mail_subject(value) + "\r\n" end else encoded_without_jpmobile end end
Also aliased as: encoded