jpmobile 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (94) hide show
  1. data/CHANGELOG +4 -0
  2. data/README +8 -5
  3. data/Rakefile +6 -7
  4. data/lib/jpmobile.rb +12 -2
  5. data/lib/jpmobile/email.rb +19 -0
  6. data/lib/jpmobile/filter.rb +1 -15
  7. data/lib/jpmobile/helpers.rb +76 -34
  8. data/lib/jpmobile/hook_action_controller.rb +1 -0
  9. data/lib/jpmobile/hook_action_view.rb +79 -28
  10. data/lib/jpmobile/mobile/abstract_mobile.rb +13 -1
  11. data/lib/jpmobile/mobile/au.rb +2 -0
  12. data/lib/jpmobile/mobile/docomo.rb +3 -1
  13. data/lib/jpmobile/mobile/emobile.rb +2 -0
  14. data/lib/jpmobile/mobile/softbank.rb +7 -1
  15. data/lib/jpmobile/mobile/willcom.rb +4 -0
  16. data/lib/jpmobile/mobile/z_display_info_docomo.rb +85 -2
  17. data/lib/jpmobile/mobile/z_ip_addresses_au.rb +40 -25
  18. data/lib/jpmobile/mobile/z_ip_addresses_docomo.rb +3 -1
  19. data/lib/jpmobile/mobile/z_ip_addresses_willcom.rb +97 -76
  20. data/lib/jpmobile/position.rb +8 -2
  21. data/lib/jpmobile/request_with_mobile.rb +1 -1
  22. data/lib/jpmobile/util.rb +21 -0
  23. data/lib/jpmobile/version.rb +1 -1
  24. data/test/au_test.rb +1 -1
  25. data/tools/update_display_info_docomo.rb +1 -0
  26. data/tools/update_ip_addresses_willcom.rb +2 -1
  27. metadata +36 -82
  28. data/doc/classes/ActionController.html +0 -120
  29. data/doc/classes/ActionController/AbstractRequest.html +0 -118
  30. data/doc/classes/ActionController/CgiRequest.html +0 -160
  31. data/doc/classes/ActionView.html +0 -101
  32. data/doc/classes/DatumConv.html +0 -324
  33. data/doc/classes/Jpmobile/Display.html +0 -333
  34. data/doc/classes/Jpmobile/Emoticon.html +0 -467
  35. data/doc/classes/Jpmobile/Filter.html +0 -120
  36. data/doc/classes/Jpmobile/Filter/ApplyOnlyForMobile.html +0 -172
  37. data/doc/classes/Jpmobile/Filter/Base.html +0 -269
  38. data/doc/classes/Jpmobile/Filter/Emoticon.html +0 -118
  39. data/doc/classes/Jpmobile/Filter/Emoticon/Inner.html +0 -184
  40. data/doc/classes/Jpmobile/Filter/Emoticon/Outer.html +0 -207
  41. data/doc/classes/Jpmobile/Filter/FilterTable.html +0 -178
  42. data/doc/classes/Jpmobile/Filter/HankakuKana.html +0 -126
  43. data/doc/classes/Jpmobile/Filter/Sjis.html +0 -271
  44. data/doc/classes/Jpmobile/Helpers.html +0 -588
  45. data/doc/classes/Jpmobile/Mobile.html +0 -150
  46. data/doc/classes/Jpmobile/Mobile/AbstractMobile.html +0 -389
  47. data/doc/classes/Jpmobile/Mobile/Au.html +0 -420
  48. data/doc/classes/Jpmobile/Mobile/Ddipocket.html +0 -138
  49. data/doc/classes/Jpmobile/Mobile/Docomo.html +0 -411
  50. data/doc/classes/Jpmobile/Mobile/Emobile.html +0 -183
  51. data/doc/classes/Jpmobile/Mobile/Jphone.html +0 -212
  52. data/doc/classes/Jpmobile/Mobile/Softbank.html +0 -344
  53. data/doc/classes/Jpmobile/Mobile/Vodafone.html +0 -176
  54. data/doc/classes/Jpmobile/Mobile/Willcom.html +0 -211
  55. data/doc/classes/Jpmobile/Position.html +0 -384
  56. data/doc/classes/Jpmobile/RequestWithMobile.html +0 -263
  57. data/doc/created.rid +0 -1
  58. data/doc/files/CHANGELOG.html +0 -110
  59. data/doc/files/README.html +0 -455
  60. data/doc/files/lib/jpmobile/datum_conv_rb.html +0 -110
  61. data/doc/files/lib/jpmobile/emoticon/au_rb.html +0 -124
  62. data/doc/files/lib/jpmobile/emoticon/conversion_table_rb.html +0 -124
  63. data/doc/files/lib/jpmobile/emoticon/docomo_rb.html +0 -119
  64. data/doc/files/lib/jpmobile/emoticon/softbank_rb.html +0 -119
  65. data/doc/files/lib/jpmobile/emoticon/z_combine_rb.html +0 -101
  66. data/doc/files/lib/jpmobile/emoticon_rb.html +0 -101
  67. data/doc/files/lib/jpmobile/filter_rb.html +0 -115
  68. data/doc/files/lib/jpmobile/helpers_rb.html +0 -105
  69. data/doc/files/lib/jpmobile/hook_abstract_request_rb.html +0 -108
  70. data/doc/files/lib/jpmobile/hook_action_controller_rb.html +0 -101
  71. data/doc/files/lib/jpmobile/hook_action_view_rb.html +0 -110
  72. data/doc/files/lib/jpmobile/mobile/abstract_mobile_rb.html +0 -108
  73. data/doc/files/lib/jpmobile/mobile/au_rb.html +0 -112
  74. data/doc/files/lib/jpmobile/mobile/display_rb.html +0 -111
  75. data/doc/files/lib/jpmobile/mobile/docomo_rb.html +0 -105
  76. data/doc/files/lib/jpmobile/mobile/emobile_rb.html +0 -105
  77. data/doc/files/lib/jpmobile/mobile/softbank_rb.html +0 -115
  78. data/doc/files/lib/jpmobile/mobile/willcom_rb.html +0 -108
  79. data/doc/files/lib/jpmobile/mobile/z_display_info_docomo_rb.html +0 -114
  80. data/doc/files/lib/jpmobile/mobile/z_ip_addresses_au_rb.html +0 -114
  81. data/doc/files/lib/jpmobile/mobile/z_ip_addresses_docomo_rb.html +0 -124
  82. data/doc/files/lib/jpmobile/mobile/z_ip_addresses_emobile_rb.html +0 -111
  83. data/doc/files/lib/jpmobile/mobile/z_ip_addresses_softbank_rb.html +0 -124
  84. data/doc/files/lib/jpmobile/mobile/z_ip_addresses_willcom_rb.html +0 -114
  85. data/doc/files/lib/jpmobile/position_rb.html +0 -105
  86. data/doc/files/lib/jpmobile/request_with_mobile_rb.html +0 -111
  87. data/doc/files/lib/jpmobile/trans_sid_rb.html +0 -118
  88. data/doc/files/lib/jpmobile/version_rb.html +0 -101
  89. data/doc/files/lib/jpmobile_rb.html +0 -101
  90. data/doc/fr_class_index.html +0 -55
  91. data/doc/fr_file_index.html +0 -58
  92. data/doc/fr_method_index.html +0 -134
  93. data/doc/index.html +0 -24
  94. data/doc/rdoc-style.css +0 -208
@@ -1,212 +0,0 @@
1
- <?xml version="1.0" encoding=" UTF-8"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
- <head>
8
- <title>Class: Jpmobile::Mobile::Jphone</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset= UTF-8" />
10
- <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
- <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
12
- <script type="text/javascript">
13
- // <![CDATA[
14
-
15
- function popupCode( url ) {
16
- window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
- }
18
-
19
- function toggleCode( id ) {
20
- if ( document.getElementById )
21
- elem = document.getElementById( id );
22
- else if ( document.all )
23
- elem = eval( "document.all." + id );
24
- else
25
- return false;
26
-
27
- elemStyle = elem.style;
28
-
29
- if ( elemStyle.display != "block" ) {
30
- elemStyle.display = "block"
31
- } else {
32
- elemStyle.display = "none"
33
- }
34
-
35
- return true;
36
- }
37
-
38
- // Make codeblocks hidden by default
39
- document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
-
41
- // ]]>
42
- </script>
43
-
44
- </head>
45
- <body>
46
-
47
-
48
-
49
- <div id="classHeader">
50
- <table class="header-table">
51
- <tr class="top-aligned-row">
52
- <td><strong>Class</strong></td>
53
- <td class="class-name-in-header">Jpmobile::Mobile::Jphone</td>
54
- </tr>
55
- <tr class="top-aligned-row">
56
- <td><strong>In:</strong></td>
57
- <td>
58
- <a href="../../../files/lib/jpmobile/mobile/softbank_rb.html">
59
- lib/jpmobile/mobile/softbank.rb
60
- </a>
61
- <br />
62
- </td>
63
- </tr>
64
-
65
- <tr class="top-aligned-row">
66
- <td><strong>Parent:</strong></td>
67
- <td>
68
- <a href="Vodafone.html">
69
- Vodafone
70
- </a>
71
- </td>
72
- </tr>
73
- </table>
74
- </div>
75
- <!-- banner header -->
76
-
77
- <div id="bodyContent">
78
-
79
-
80
-
81
- <div id="contextContent">
82
-
83
- <div id="description">
84
- <h2>SoftBank 2G携帯電話(J-PHONE/<a href="Vodafone.html">Vodafone</a> 2G)</h2>
85
- <p>
86
- スーパクラスは<a href="Vodafone.html">Vodafone</a>。
87
- </p>
88
-
89
- </div>
90
-
91
-
92
- </div>
93
-
94
- <div id="method-list">
95
- <h3 class="section-bar">Methods</h3>
96
-
97
- <div class="name-list">
98
- <a href="#M000024">position</a>&nbsp;&nbsp;
99
- <a href="#M000025">supports_cookie?</a>&nbsp;&nbsp;
100
- </div>
101
- </div>
102
-
103
- </div>
104
-
105
-
106
- <!-- if includes -->
107
-
108
- <div id="section">
109
-
110
-
111
- <div id="constants-list">
112
- <h3 class="section-bar">Constants</h3>
113
-
114
- <div class="name-list">
115
- <table summary="Constants">
116
- <tr class="top-aligned-row context-row">
117
- <td class="context-item-name">USER_AGENT_REGEXP</td>
118
- <td>=</td>
119
- <td class="context-item-value">/^(J-PHONE|J-EMULATOR)/</td>
120
- <td width="3em">&nbsp;</td>
121
- <td class="context-item-desc">
122
- 対応するUser-Agentの正規表現
123
-
124
- </td>
125
- </tr>
126
- </table>
127
- </div>
128
- </div>
129
-
130
-
131
-
132
-
133
-
134
-
135
- <!-- if method_list -->
136
- <div id="methods">
137
- <h3 class="section-bar">Public Instance methods</h3>
138
-
139
- <div id="method-M000024" class="method-detail">
140
- <a name="M000024"></a>
141
-
142
- <div class="method-heading">
143
- <a href="#M000024" class="method-signature">
144
- <span class="method-name">position</span><span class="method-args">()</span>
145
- </a>
146
- </div>
147
-
148
- <div class="method-description">
149
- <p>
150
- 位置情報があれば <a href="../Position.html">Position</a>
151
- のインスタンスを返す。無ければ <tt>nil</tt> を返す。
152
- </p>
153
- <p><a class="source-toggle" href="#"
154
- onclick="toggleCode('M000024-source');return false;">[Source]</a></p>
155
- <div class="method-source-code" id="M000024-source">
156
- <pre>
157
- <span class="ruby-comment cmt"># File lib/jpmobile/mobile/softbank.rb, line 87</span>
158
- 87: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">position</span>
159
- 88: <span class="ruby-identifier">str</span> = <span class="ruby-ivar">@request</span>.<span class="ruby-identifier">env</span>[<span class="ruby-value str">&quot;HTTP_X_JPHONE_GEOCODE&quot;</span>]
160
- 89: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">str</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">str</span> <span class="ruby-operator">==</span> <span class="ruby-value str">&quot;0000000%1A0000000%1A%88%CA%92%75%8F%EE%95%F1%82%C8%82%B5&quot;</span>
161
- 90: <span class="ruby-identifier">raise</span> <span class="ruby-value str">&quot;unsuppoted format&quot;</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">str</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/^(\d\d)(\d\d)(\d\d)%1A(\d\d\d)(\d\d)(\d\d)%1A(.+)$/</span>
162
- 91: <span class="ruby-identifier">pos</span> = <span class="ruby-constant">Jpmobile</span><span class="ruby-operator">::</span><span class="ruby-constant">Position</span>.<span class="ruby-identifier">new</span>
163
- 92: <span class="ruby-identifier">pos</span>.<span class="ruby-identifier">lat</span> = <span class="ruby-constant">Jpmobile</span><span class="ruby-operator">::</span><span class="ruby-constant">Position</span>.<span class="ruby-identifier">dms2deg</span>(<span class="ruby-identifier">$1</span>,<span class="ruby-identifier">$2</span>,<span class="ruby-identifier">$3</span>)
164
- 93: <span class="ruby-identifier">pos</span>.<span class="ruby-identifier">lon</span> = <span class="ruby-constant">Jpmobile</span><span class="ruby-operator">::</span><span class="ruby-constant">Position</span>.<span class="ruby-identifier">dms2deg</span>(<span class="ruby-identifier">$4</span>,<span class="ruby-identifier">$5</span>,<span class="ruby-identifier">$6</span>)
165
- 94: <span class="ruby-identifier">pos</span>.<span class="ruby-identifier">options</span> = {<span class="ruby-value str">&quot;address&quot;</span>=<span class="ruby-operator">&gt;</span><span class="ruby-constant">CGI</span>.<span class="ruby-identifier">unescape</span>(<span class="ruby-identifier">$7</span>).<span class="ruby-identifier">toutf8</span>}
166
- 95: <span class="ruby-identifier">pos</span>.<span class="ruby-identifier">tokyo2wgs84!</span>
167
- 96: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">pos</span>
168
- 97: <span class="ruby-keyword kw">end</span>
169
- </pre>
170
- </div>
171
- </div>
172
- </div>
173
-
174
- <div id="method-M000025" class="method-detail">
175
- <a name="M000025"></a>
176
-
177
- <div class="method-heading">
178
- <a href="#M000025" class="method-signature">
179
- <span class="method-name">supports_cookie?</span><span class="method-args">()</span>
180
- </a>
181
- </div>
182
-
183
- <div class="method-description">
184
- <p>
185
- cookieに対応しているか?
186
- </p>
187
- <p><a class="source-toggle" href="#"
188
- onclick="toggleCode('M000025-source');return false;">[Source]</a></p>
189
- <div class="method-source-code" id="M000025-source">
190
- <pre>
191
- <span class="ruby-comment cmt"># File lib/jpmobile/mobile/softbank.rb, line 100</span>
192
- 100: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">supports_cookie?</span>
193
- 101: <span class="ruby-keyword kw">false</span>
194
- 102: <span class="ruby-keyword kw">end</span>
195
- </pre>
196
- </div>
197
- </div>
198
- </div>
199
-
200
-
201
- </div>
202
-
203
-
204
- </div>
205
-
206
-
207
- <div id="validator-badges">
208
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
209
- </div>
210
-
211
- </body>
212
- </html>
@@ -1,344 +0,0 @@
1
- <?xml version="1.0" encoding=" UTF-8"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
- <head>
8
- <title>Class: Jpmobile::Mobile::Softbank</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset= UTF-8" />
10
- <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
- <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
12
- <script type="text/javascript">
13
- // <![CDATA[
14
-
15
- function popupCode( url ) {
16
- window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
- }
18
-
19
- function toggleCode( id ) {
20
- if ( document.getElementById )
21
- elem = document.getElementById( id );
22
- else if ( document.all )
23
- elem = eval( "document.all." + id );
24
- else
25
- return false;
26
-
27
- elemStyle = elem.style;
28
-
29
- if ( elemStyle.display != "block" ) {
30
- elemStyle.display = "block"
31
- } else {
32
- elemStyle.display = "none"
33
- }
34
-
35
- return true;
36
- }
37
-
38
- // Make codeblocks hidden by default
39
- document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
-
41
- // ]]>
42
- </script>
43
-
44
- </head>
45
- <body>
46
-
47
-
48
-
49
- <div id="classHeader">
50
- <table class="header-table">
51
- <tr class="top-aligned-row">
52
- <td><strong>Class</strong></td>
53
- <td class="class-name-in-header">Jpmobile::Mobile::Softbank</td>
54
- </tr>
55
- <tr class="top-aligned-row">
56
- <td><strong>In:</strong></td>
57
- <td>
58
- <a href="../../../files/lib/jpmobile/mobile/softbank_rb.html">
59
- lib/jpmobile/mobile/softbank.rb
60
- </a>
61
- <br />
62
- </td>
63
- </tr>
64
-
65
- <tr class="top-aligned-row">
66
- <td><strong>Parent:</strong></td>
67
- <td>
68
- <a href="AbstractMobile.html">
69
- AbstractMobile
70
- </a>
71
- </td>
72
- </tr>
73
- </table>
74
- </div>
75
- <!-- banner header -->
76
-
77
- <div id="bodyContent">
78
-
79
-
80
-
81
- <div id="contextContent">
82
-
83
- <div id="description">
84
- <h2><a href="Softbank.html">Softbank</a>携帯電話</h2>
85
- <p>
86
- <a href="Vodafone.html">Vodafone</a>, <a
87
- href="Jphone.html">Jphone</a>のスーパクラス。
88
- </p>
89
-
90
- </div>
91
-
92
-
93
- </div>
94
-
95
- <div id="method-list">
96
- <h3 class="section-bar">Methods</h3>
97
-
98
- <div class="name-list">
99
- <a href="#M000031">display</a>&nbsp;&nbsp;
100
- <a href="#M000027">ident_device</a>&nbsp;&nbsp;
101
- <a href="#M000029">ident_subscriber</a>&nbsp;&nbsp;
102
- <a href="#M000030">position</a>&nbsp;&nbsp;
103
- <a href="#M000026">serial_number</a>&nbsp;&nbsp;
104
- <a href="#M000032">supports_cookie?</a>&nbsp;&nbsp;
105
- <a href="#M000028">x_jphone_uid</a>&nbsp;&nbsp;
106
- </div>
107
- </div>
108
-
109
- </div>
110
-
111
-
112
- <!-- if includes -->
113
-
114
- <div id="section">
115
-
116
-
117
- <div id="constants-list">
118
- <h3 class="section-bar">Constants</h3>
119
-
120
- <div class="name-list">
121
- <table summary="Constants">
122
- <tr class="top-aligned-row context-row">
123
- <td class="context-item-name">USER_AGENT_REGEXP</td>
124
- <td>=</td>
125
- <td class="context-item-value">/^(SoftBank|Semulator)/</td>
126
- <td width="3em">&nbsp;</td>
127
- <td class="context-item-desc">
128
- 対応するuser-agentの正規表現
129
-
130
- </td>
131
- </tr>
132
- </table>
133
- </div>
134
- </div>
135
-
136
-
137
-
138
-
139
-
140
-
141
- <!-- if method_list -->
142
- <div id="methods">
143
- <h3 class="section-bar">Public Instance methods</h3>
144
-
145
- <div id="method-M000031" class="method-detail">
146
- <a name="M000031"></a>
147
-
148
- <div class="method-heading">
149
- <a href="#M000031" class="method-signature">
150
- <span class="method-name">display</span><span class="method-args">()</span>
151
- </a>
152
- </div>
153
-
154
- <div class="method-description">
155
- <p>
156
- 画面情報を <tt><a href="../Display.html">Display</a></tt>
157
- クラスのインスタンスで返す。
158
- </p>
159
- <p><a class="source-toggle" href="#"
160
- onclick="toggleCode('M000031-source');return false;">[Source]</a></p>
161
- <div class="method-source-code" id="M000031-source">
162
- <pre>
163
- <span class="ruby-comment cmt"># File lib/jpmobile/mobile/softbank.rb, line 44</span>
164
- 44: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">display</span>
165
- 45: <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@__display</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@__display</span>
166
- 46: <span class="ruby-identifier">p_w</span> = <span class="ruby-identifier">p_h</span> = <span class="ruby-identifier">col_p</span> = <span class="ruby-identifier">cols</span> = <span class="ruby-keyword kw">nil</span>
167
- 47: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">r</span> = <span class="ruby-ivar">@request</span>.<span class="ruby-identifier">env</span>[<span class="ruby-value str">'HTTP_X_JPHONE_DISPLAY'</span>]
168
- 48: <span class="ruby-identifier">p_w</span>, <span class="ruby-identifier">p_h</span> = <span class="ruby-identifier">r</span>.<span class="ruby-identifier">split</span>(<span class="ruby-regexp re">/\*/</span>,<span class="ruby-value">2</span>).<span class="ruby-identifier">map</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">x</span><span class="ruby-operator">|</span> <span class="ruby-identifier">x</span>.<span class="ruby-identifier">to_i</span>}
169
- 49: <span class="ruby-keyword kw">end</span>
170
- 50: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">r</span> = <span class="ruby-ivar">@request</span>.<span class="ruby-identifier">env</span>[<span class="ruby-value str">'HTTP_X_JPHONE_COLOR'</span>]
171
- 51: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">r</span>
172
- 52: <span class="ruby-keyword kw">when</span> <span class="ruby-regexp re">/^C/</span>
173
- 53: <span class="ruby-identifier">col_p</span> = <span class="ruby-keyword kw">true</span>
174
- 54: <span class="ruby-keyword kw">when</span> <span class="ruby-regexp re">/^G/</span>
175
- 55: <span class="ruby-identifier">col_p</span> = <span class="ruby-keyword kw">false</span>
176
- 56: <span class="ruby-keyword kw">end</span>
177
- 57: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">r</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/^.(\d+)$/</span>
178
- 58: <span class="ruby-identifier">cols</span> = <span class="ruby-identifier">$1</span>.<span class="ruby-identifier">to_i</span>
179
- 59: <span class="ruby-keyword kw">end</span>
180
- 60: <span class="ruby-keyword kw">end</span>
181
- 61: <span class="ruby-ivar">@__display</span> = <span class="ruby-constant">Jpmobile</span><span class="ruby-operator">::</span><span class="ruby-constant">Display</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">p_w</span>, <span class="ruby-identifier">p_h</span>, <span class="ruby-keyword kw">nil</span>, <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">col_p</span>, <span class="ruby-identifier">cols</span>)
182
- 62: <span class="ruby-keyword kw">end</span>
183
- </pre>
184
- </div>
185
- </div>
186
- </div>
187
-
188
- <div id="method-M000027" class="method-detail">
189
- <a name="M000027"></a>
190
-
191
- <div class="method-heading">
192
- <span class="method-name">ident_device</span><span class="method-args">()</span>
193
- </div>
194
-
195
- <div class="method-description">
196
- <p>
197
- Alias for <a href="Softbank.html#M000026">serial_number</a>
198
- </p>
199
- </div>
200
- </div>
201
-
202
- <div id="method-M000029" class="method-detail">
203
- <a name="M000029"></a>
204
-
205
- <div class="method-heading">
206
- <span class="method-name">ident_subscriber</span><span class="method-args">()</span>
207
- </div>
208
-
209
- <div class="method-description">
210
- <p>
211
- Alias for <a href="Softbank.html#M000028">x_jphone_uid</a>
212
- </p>
213
- </div>
214
- </div>
215
-
216
- <div id="method-M000030" class="method-detail">
217
- <a name="M000030"></a>
218
-
219
- <div class="method-heading">
220
- <a href="#M000030" class="method-signature">
221
- <span class="method-name">position</span><span class="method-args">()</span>
222
- </a>
223
- </div>
224
-
225
- <div class="method-description">
226
- <p>
227
- 位置情報があれば <a href="../Position.html">Position</a>
228
- のインスタンスを返す。無ければ <tt>nil</tt> を返す。
229
- </p>
230
- <p><a class="source-toggle" href="#"
231
- onclick="toggleCode('M000030-source');return false;">[Source]</a></p>
232
- <div class="method-source-code" id="M000030-source">
233
- <pre>
234
- <span class="ruby-comment cmt"># File lib/jpmobile/mobile/softbank.rb, line 29</span>
235
- 29: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">position</span>
236
- 30: <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@__position</span> <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">defined?</span> <span class="ruby-ivar">@__position</span>
237
- 31: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">params</span>[<span class="ruby-value str">&quot;pos&quot;</span>] <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/^([NS])(\d+)\.(\d+)\.(\d+\.\d+)([WE])(\d+)\.(\d+)\.(\d+\.\d+)$/</span>
238
- 32: <span class="ruby-identifier">raise</span> <span class="ruby-value str">&quot;Unsupported datum&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">params</span>[<span class="ruby-value str">&quot;geo&quot;</span>] <span class="ruby-operator">!=</span> <span class="ruby-value str">&quot;wgs84&quot;</span>
239
- 33: <span class="ruby-identifier">l</span> = <span class="ruby-constant">Jpmobile</span><span class="ruby-operator">::</span><span class="ruby-constant">Position</span>.<span class="ruby-identifier">new</span>
240
- 34: <span class="ruby-identifier">l</span>.<span class="ruby-identifier">lat</span> = (<span class="ruby-identifier">$1</span><span class="ruby-operator">==</span><span class="ruby-value str">&quot;N&quot;</span> <span class="ruby-operator">?</span> <span class="ruby-value">1</span> <span class="ruby-operator">:</span> <span class="ruby-value">-1</span>) <span class="ruby-operator">*</span> <span class="ruby-constant">Jpmobile</span><span class="ruby-operator">::</span><span class="ruby-constant">Position</span>.<span class="ruby-identifier">dms2deg</span>(<span class="ruby-identifier">$2</span>,<span class="ruby-identifier">$3</span>,<span class="ruby-identifier">$4</span>)
241
- 35: <span class="ruby-identifier">l</span>.<span class="ruby-identifier">lon</span> = (<span class="ruby-identifier">$5</span><span class="ruby-operator">==</span><span class="ruby-value str">&quot;E&quot;</span> <span class="ruby-operator">?</span> <span class="ruby-value">1</span> <span class="ruby-operator">:</span> <span class="ruby-value">-1</span>) <span class="ruby-operator">*</span> <span class="ruby-constant">Jpmobile</span><span class="ruby-operator">::</span><span class="ruby-constant">Position</span>.<span class="ruby-identifier">dms2deg</span>(<span class="ruby-identifier">$6</span>,<span class="ruby-identifier">$7</span>,<span class="ruby-identifier">$8</span>)
242
- 36: <span class="ruby-identifier">l</span>.<span class="ruby-identifier">options</span> = <span class="ruby-identifier">params</span>.<span class="ruby-identifier">reject</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">x</span>,<span class="ruby-identifier">v</span><span class="ruby-operator">|</span> <span class="ruby-operator">!</span>[<span class="ruby-value str">&quot;pos&quot;</span>,<span class="ruby-value str">&quot;geo&quot;</span>,<span class="ruby-value str">&quot;x-acr&quot;</span>].<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">x</span>) }
243
- 37: <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@__position</span> = <span class="ruby-identifier">l</span>
244
- 38: <span class="ruby-keyword kw">else</span>
245
- 39: <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@__position</span> = <span class="ruby-keyword kw">nil</span>
246
- 40: <span class="ruby-keyword kw">end</span>
247
- 41: <span class="ruby-keyword kw">end</span>
248
- </pre>
249
- </div>
250
- </div>
251
- </div>
252
-
253
- <div id="method-M000026" class="method-detail">
254
- <a name="M000026"></a>
255
-
256
- <div class="method-heading">
257
- <a href="#M000026" class="method-signature">
258
- <span class="method-name">serial_number</span><span class="method-args">()</span>
259
- </a>
260
- </div>
261
-
262
- <div class="method-description">
263
- <p>
264
- 製造番号を返す。無ければ <tt>nil</tt> を返す。
265
- </p>
266
- <p><a class="source-toggle" href="#"
267
- onclick="toggleCode('M000026-source');return false;">[Source]</a></p>
268
- <div class="method-source-code" id="M000026-source">
269
- <pre>
270
- <span class="ruby-comment cmt"># File lib/jpmobile/mobile/softbank.rb, line 16</span>
271
- 16: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">serial_number</span>
272
- 17: <span class="ruby-ivar">@request</span>.<span class="ruby-identifier">env</span>[<span class="ruby-value str">'HTTP_USER_AGENT'</span>] <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/SN(.+?) /</span>
273
- 18: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">$1</span>
274
- 19: <span class="ruby-keyword kw">end</span>
275
- </pre>
276
- </div>
277
- </div>
278
- </div>
279
-
280
- <div id="method-M000032" class="method-detail">
281
- <a name="M000032"></a>
282
-
283
- <div class="method-heading">
284
- <a href="#M000032" class="method-signature">
285
- <span class="method-name">supports_cookie?</span><span class="method-args">()</span>
286
- </a>
287
- </div>
288
-
289
- <div class="method-description">
290
- <p>
291
- cookieに対応しているか?
292
- </p>
293
- <p><a class="source-toggle" href="#"
294
- onclick="toggleCode('M000032-source');return false;">[Source]</a></p>
295
- <div class="method-source-code" id="M000032-source">
296
- <pre>
297
- <span class="ruby-comment cmt"># File lib/jpmobile/mobile/softbank.rb, line 65</span>
298
- 65: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">supports_cookie?</span>
299
- 66: <span class="ruby-keyword kw">true</span>
300
- 67: <span class="ruby-keyword kw">end</span>
301
- </pre>
302
- </div>
303
- </div>
304
- </div>
305
-
306
- <div id="method-M000028" class="method-detail">
307
- <a name="M000028"></a>
308
-
309
- <div class="method-heading">
310
- <a href="#M000028" class="method-signature">
311
- <span class="method-name">x_jphone_uid</span><span class="method-args">()</span>
312
- </a>
313
- </div>
314
-
315
- <div class="method-description">
316
- <p>
317
- UIDを返す。
318
- </p>
319
- <p><a class="source-toggle" href="#"
320
- onclick="toggleCode('M000028-source');return false;">[Source]</a></p>
321
- <div class="method-source-code" id="M000028-source">
322
- <pre>
323
- <span class="ruby-comment cmt"># File lib/jpmobile/mobile/softbank.rb, line 23</span>
324
- 23: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">x_jphone_uid</span>
325
- 24: <span class="ruby-ivar">@request</span>.<span class="ruby-identifier">env</span>[<span class="ruby-value str">&quot;HTTP_X_JPHONE_UID&quot;</span>]
326
- 25: <span class="ruby-keyword kw">end</span>
327
- </pre>
328
- </div>
329
- </div>
330
- </div>
331
-
332
-
333
- </div>
334
-
335
-
336
- </div>
337
-
338
-
339
- <div id="validator-badges">
340
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
341
- </div>
342
-
343
- </body>
344
- </html>