Class: Mail::Address

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

Instance Method Summary collapse

Instance Method Details

#encoded_with_jpmobileObject Also known as: encoded


548
549
550
# File 'lib/jpmobile/mail.rb', line 548

def encoded_with_jpmobile
  encoded_without_jpmobile
end

#get_display_name_with_jpmobileObject Also known as: get_display_name


552
553
554
555
556
557
558
559
560
561
562
563
# File 'lib/jpmobile/mail.rb', line 552

def get_display_name_with_jpmobile
  begin
    get_display_name_without_jpmobile
  rescue NoMethodError => ex
    if ex.message.match(/undefined method `gsub' for nil:NilClass/)
      name = unquote(tree.display_name.text_value.strip.to_s)
      strip_all_comments(name.to_s)
    else
      raise ex
    end
  end
end