Class: Jpmobile::Mobile::Willcom

Inherits:
AbstractMobile show all
Defined in:
lib/jpmobile/mobile/willcom.rb

Overview

Willcom携帯電話

Ddipocketのスーパクラス。

Direct Known Subclasses

Ddipocket

Constant Summary

USER_AGENT_REGEXP =

対応するUser-Agentの正規表現

/^Mozilla\/3.0\(WILLCOM/
MAIL_ADDRESS_REGEXP =

対応するメールアドレスの正規表現

/.+@((.+\.)?pdx\.ne\.jp|willcom\.com)/

Constants inherited from AbstractMobile

AbstractMobile::MAIL_CHARSET, AbstractMobile::MAIL_CONTENT_TRANSFER_ENCODING

Instance Method Summary (collapse)

Methods inherited from AbstractMobile

add_user_agent_regexp, #apply_filter?, #apply_params_filter?, carrier, check_carrier, #content_transfer_encoding, #decode_transfer_encoding, #decoratable?, #decorated=, #decorated?, #default_charset, #display, #ident, #ident_device, #ident_subscriber, #initialize, ip_address_class, #mail_charset, #mail_variants, #require_related_part?, #smart_phone?, #tablet?, #to_external, #to_internal, #to_mail_body, #to_mail_body_encoded?, #to_mail_encoding, #to_mail_internal, #to_mail_subject, #to_mail_subject_encoded?, user_agent_regexp, #utf8_to_mail_encode, valid_ip?, #valid_ip?, #variants

Constructor Details

This class inherits a constructor from Jpmobile::Mobile::AbstractMobile

Instance Method Details

- (Object) position

位置情報があれば Position のインスタンスを返す。無ければ nil を返す。



13
14
15
16
17
18
19
20
21
22
# File 'lib/jpmobile/mobile/willcom.rb', line 13

def position
  return @__position if defined? @__position
  return @__position = nil if ( params["pos"].nil? || params['pos'] == '' )
  raise "unsupported format" unless params["pos"] =~ /^N(\d\d)\.(\d\d)\.(\d\d\.\d\d\d)E(\d\d\d)\.(\d\d)\.(\d\d\.\d\d\d)$/
  pos = Jpmobile::Position.new
  pos.lat = Jpmobile::Position.dms2deg($1,$2,$3)
  pos.lon = Jpmobile::Position.dms2deg($4,$5,$6)
  pos.tokyo2wgs84!
  return @__position = pos
end

- (Boolean) supports_cookie?

cookieに対応しているか?



24
25
26
# File 'lib/jpmobile/mobile/willcom.rb', line 24

def supports_cookie?
  true
end