Module Jpmobile::Email
In: lib/jpmobile/email.rb

email関連の処理

Methods

detect  

Public Class methods

メールアドレスよりキャリア情報を取得する

_param1_:email メールアドレス
return :Jpmobile::Mobileで定義されている携帯キャリアクラス

[Source]

    # File lib/jpmobile/email.rb, line 10
10:     def self.detect(email)
11:       Jpmobile::Mobile.carriers.each do |const|
12:         c = Jpmobile::Mobile.const_get(const)
13:         return c if c::MAIL_ADDRESS_REGEXP && email =~ c::MAIL_ADDRESS_REGEXP
14:       end
15:       nil
16:     end

[Validate]