Class: Mail::FromField

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


506
507
508
509
510
511
512
# File 'lib/jpmobile/mail.rb', line 506

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


490
491
492
493
# File 'lib/jpmobile/mail.rb', line 490

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

#mobile=(m) ⇒ Object


498
499
500
501
502
503
504
# File 'lib/jpmobile/mail.rb', line 498

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