Module: RailsCom::ActionMailbox::MailExt
- Defined in:
- lib/rails_com/action_mailbox/mail_ext.rb
Instance Method Summary collapse
Instance Method Details
#from ⇒ Object
4 5 6 7 8 9 10 11 12 13 |
# File 'lib/rails_com/action_mailbox/mail_ext.rb', line 4 def from r = super if r.is_a?(String) r.encode('utf-8', replace: '') elsif r.is_a?(Array) r.map { |i| i.encode('utf-8', replace: '') } else super end end |
#subject ⇒ Object
26 27 28 |
# File 'lib/rails_com/action_mailbox/mail_ext.rb', line 26 def subject super.encode('utf-8', replace: '') end |
#to ⇒ Object
15 16 17 18 19 20 21 22 23 24 |
# File 'lib/rails_com/action_mailbox/mail_ext.rb', line 15 def to r = super if r.is_a?(String) r.encode('utf-8', replace: '') elsif r.is_a?(Array) r.map { |i| i.encode('utf-8', replace: '') } else super end end |