Class: Mail::ToField

Inherits:
StructuredField show all
Defined in:
lib/jpmobile/mail.rb

Instance Attribute Summary

Attributes inherited from StructuredField

#mobile

Instance Method Summary collapse

Instance Method Details

#encoded_with_jpmobileObject Also known as: encoded


535
536
537
538
539
540
541
# File 'lib/jpmobile/mail.rb', line 535

def encoded_with_jpmobile
  if @mobile
    self.charset = @mobile.mail_charset
  end

  encoded_without_jpmobile
end

#initialize_with_jpmobile(value = nil, charset = 'utf-8') ⇒ Object Also known as: initialize


519
520
521
522
# File 'lib/jpmobile/mail.rb', line 519

def initialize_with_jpmobile(value = nil, charset = 'utf-8')
  @jpmobile_raw_text = value
  initialize_without_jpmobile(value, charset)
end

#mobile=(m) ⇒ Object


527
528
529
530
531
532
533
# File 'lib/jpmobile/mail.rb', line 527

def mobile=(m)
  if @mobile = m
    self.charset = @mobile.mail_charset
    self.value   = @jpmobile_raw_text
    self.parse
  end
end