jpmobile 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +4 -0
- data/README +8 -5
- data/Rakefile +6 -7
- data/lib/jpmobile.rb +12 -2
- data/lib/jpmobile/email.rb +19 -0
- data/lib/jpmobile/filter.rb +1 -15
- data/lib/jpmobile/helpers.rb +76 -34
- data/lib/jpmobile/hook_action_controller.rb +1 -0
- data/lib/jpmobile/hook_action_view.rb +79 -28
- data/lib/jpmobile/mobile/abstract_mobile.rb +13 -1
- data/lib/jpmobile/mobile/au.rb +2 -0
- data/lib/jpmobile/mobile/docomo.rb +3 -1
- data/lib/jpmobile/mobile/emobile.rb +2 -0
- data/lib/jpmobile/mobile/softbank.rb +7 -1
- data/lib/jpmobile/mobile/willcom.rb +4 -0
- data/lib/jpmobile/mobile/z_display_info_docomo.rb +85 -2
- data/lib/jpmobile/mobile/z_ip_addresses_au.rb +40 -25
- data/lib/jpmobile/mobile/z_ip_addresses_docomo.rb +3 -1
- data/lib/jpmobile/mobile/z_ip_addresses_willcom.rb +97 -76
- data/lib/jpmobile/position.rb +8 -2
- data/lib/jpmobile/request_with_mobile.rb +1 -1
- data/lib/jpmobile/util.rb +21 -0
- data/lib/jpmobile/version.rb +1 -1
- data/test/au_test.rb +1 -1
- data/tools/update_display_info_docomo.rb +1 -0
- data/tools/update_ip_addresses_willcom.rb +2 -1
- metadata +36 -82
- data/doc/classes/ActionController.html +0 -120
- data/doc/classes/ActionController/AbstractRequest.html +0 -118
- data/doc/classes/ActionController/CgiRequest.html +0 -160
- data/doc/classes/ActionView.html +0 -101
- data/doc/classes/DatumConv.html +0 -324
- data/doc/classes/Jpmobile/Display.html +0 -333
- data/doc/classes/Jpmobile/Emoticon.html +0 -467
- data/doc/classes/Jpmobile/Filter.html +0 -120
- data/doc/classes/Jpmobile/Filter/ApplyOnlyForMobile.html +0 -172
- data/doc/classes/Jpmobile/Filter/Base.html +0 -269
- data/doc/classes/Jpmobile/Filter/Emoticon.html +0 -118
- data/doc/classes/Jpmobile/Filter/Emoticon/Inner.html +0 -184
- data/doc/classes/Jpmobile/Filter/Emoticon/Outer.html +0 -207
- data/doc/classes/Jpmobile/Filter/FilterTable.html +0 -178
- data/doc/classes/Jpmobile/Filter/HankakuKana.html +0 -126
- data/doc/classes/Jpmobile/Filter/Sjis.html +0 -271
- data/doc/classes/Jpmobile/Helpers.html +0 -588
- data/doc/classes/Jpmobile/Mobile.html +0 -150
- data/doc/classes/Jpmobile/Mobile/AbstractMobile.html +0 -389
- data/doc/classes/Jpmobile/Mobile/Au.html +0 -420
- data/doc/classes/Jpmobile/Mobile/Ddipocket.html +0 -138
- data/doc/classes/Jpmobile/Mobile/Docomo.html +0 -411
- data/doc/classes/Jpmobile/Mobile/Emobile.html +0 -183
- data/doc/classes/Jpmobile/Mobile/Jphone.html +0 -212
- data/doc/classes/Jpmobile/Mobile/Softbank.html +0 -344
- data/doc/classes/Jpmobile/Mobile/Vodafone.html +0 -176
- data/doc/classes/Jpmobile/Mobile/Willcom.html +0 -211
- data/doc/classes/Jpmobile/Position.html +0 -384
- data/doc/classes/Jpmobile/RequestWithMobile.html +0 -263
- data/doc/created.rid +0 -1
- data/doc/files/CHANGELOG.html +0 -110
- data/doc/files/README.html +0 -455
- data/doc/files/lib/jpmobile/datum_conv_rb.html +0 -110
- data/doc/files/lib/jpmobile/emoticon/au_rb.html +0 -124
- data/doc/files/lib/jpmobile/emoticon/conversion_table_rb.html +0 -124
- data/doc/files/lib/jpmobile/emoticon/docomo_rb.html +0 -119
- data/doc/files/lib/jpmobile/emoticon/softbank_rb.html +0 -119
- data/doc/files/lib/jpmobile/emoticon/z_combine_rb.html +0 -101
- data/doc/files/lib/jpmobile/emoticon_rb.html +0 -101
- data/doc/files/lib/jpmobile/filter_rb.html +0 -115
- data/doc/files/lib/jpmobile/helpers_rb.html +0 -105
- data/doc/files/lib/jpmobile/hook_abstract_request_rb.html +0 -108
- data/doc/files/lib/jpmobile/hook_action_controller_rb.html +0 -101
- data/doc/files/lib/jpmobile/hook_action_view_rb.html +0 -110
- data/doc/files/lib/jpmobile/mobile/abstract_mobile_rb.html +0 -108
- data/doc/files/lib/jpmobile/mobile/au_rb.html +0 -112
- data/doc/files/lib/jpmobile/mobile/display_rb.html +0 -111
- data/doc/files/lib/jpmobile/mobile/docomo_rb.html +0 -105
- data/doc/files/lib/jpmobile/mobile/emobile_rb.html +0 -105
- data/doc/files/lib/jpmobile/mobile/softbank_rb.html +0 -115
- data/doc/files/lib/jpmobile/mobile/willcom_rb.html +0 -108
- data/doc/files/lib/jpmobile/mobile/z_display_info_docomo_rb.html +0 -114
- data/doc/files/lib/jpmobile/mobile/z_ip_addresses_au_rb.html +0 -114
- data/doc/files/lib/jpmobile/mobile/z_ip_addresses_docomo_rb.html +0 -124
- data/doc/files/lib/jpmobile/mobile/z_ip_addresses_emobile_rb.html +0 -111
- data/doc/files/lib/jpmobile/mobile/z_ip_addresses_softbank_rb.html +0 -124
- data/doc/files/lib/jpmobile/mobile/z_ip_addresses_willcom_rb.html +0 -114
- data/doc/files/lib/jpmobile/position_rb.html +0 -105
- data/doc/files/lib/jpmobile/request_with_mobile_rb.html +0 -111
- data/doc/files/lib/jpmobile/trans_sid_rb.html +0 -118
- data/doc/files/lib/jpmobile/version_rb.html +0 -101
- data/doc/files/lib/jpmobile_rb.html +0 -101
- data/doc/fr_class_index.html +0 -55
- data/doc/fr_file_index.html +0 -58
- data/doc/fr_method_index.html +0 -134
- data/doc/index.html +0 -24
- data/doc/rdoc-style.css +0 -208
@@ -1,411 +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::Docomo</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::Docomo</td>
|
54
|
-
</tr>
|
55
|
-
<tr class="top-aligned-row">
|
56
|
-
<td><strong>In:</strong></td>
|
57
|
-
<td>
|
58
|
-
<a href="../../../files/lib/jpmobile/mobile/docomo_rb.html">
|
59
|
-
lib/jpmobile/mobile/docomo.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>DoCoMo携帯電話</h2>
|
85
|
-
|
86
|
-
</div>
|
87
|
-
|
88
|
-
|
89
|
-
</div>
|
90
|
-
|
91
|
-
<div id="method-list">
|
92
|
-
<h3 class="section-bar">Methods</h3>
|
93
|
-
|
94
|
-
<div class="name-list">
|
95
|
-
<a href="#M000013">areacode</a>
|
96
|
-
<a href="#M000020">display</a>
|
97
|
-
<a href="#M000018">guid</a>
|
98
|
-
<a href="#M000017">icc</a>
|
99
|
-
<a href="#M000016">ident_device</a>
|
100
|
-
<a href="#M000019">ident_subscriber</a>
|
101
|
-
<a href="#M000014">position</a>
|
102
|
-
<a href="#M000015">serial_number</a>
|
103
|
-
<a href="#M000021">supports_cookie?</a>
|
104
|
-
</div>
|
105
|
-
</div>
|
106
|
-
|
107
|
-
</div>
|
108
|
-
|
109
|
-
|
110
|
-
<!-- if includes -->
|
111
|
-
|
112
|
-
<div id="section">
|
113
|
-
|
114
|
-
|
115
|
-
<div id="constants-list">
|
116
|
-
<h3 class="section-bar">Constants</h3>
|
117
|
-
|
118
|
-
<div class="name-list">
|
119
|
-
<table summary="Constants">
|
120
|
-
<tr class="top-aligned-row context-row">
|
121
|
-
<td class="context-item-name">USER_AGENT_REGEXP</td>
|
122
|
-
<td>=</td>
|
123
|
-
<td class="context-item-value">/^DoCoMo/</td>
|
124
|
-
<td width="3em"> </td>
|
125
|
-
<td class="context-item-desc">
|
126
|
-
対応するUser-Agentの正規表現
|
127
|
-
|
128
|
-
</td>
|
129
|
-
</tr>
|
130
|
-
</table>
|
131
|
-
</div>
|
132
|
-
</div>
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
<!-- if method_list -->
|
140
|
-
<div id="methods">
|
141
|
-
<h3 class="section-bar">Public Instance methods</h3>
|
142
|
-
|
143
|
-
<div id="method-M000013" class="method-detail">
|
144
|
-
<a name="M000013"></a>
|
145
|
-
|
146
|
-
<div class="method-heading">
|
147
|
-
<a href="#M000013" class="method-signature">
|
148
|
-
<span class="method-name">areacode</span><span class="method-args">()</span>
|
149
|
-
</a>
|
150
|
-
</div>
|
151
|
-
|
152
|
-
<div class="method-description">
|
153
|
-
<p>
|
154
|
-
オープンiエリアがあればエリアコードを <tt>String</tt>
|
155
|
-
で返す。無ければ <tt>nil</tt> を返す。
|
156
|
-
</p>
|
157
|
-
<p><a class="source-toggle" href="#"
|
158
|
-
onclick="toggleCode('M000013-source');return false;">[Source]</a></p>
|
159
|
-
<div class="method-source-code" id="M000013-source">
|
160
|
-
<pre>
|
161
|
-
<span class="ruby-comment cmt"># File lib/jpmobile/mobile/docomo.rb, line 13</span>
|
162
|
-
13: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">areacode</span>
|
163
|
-
14: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">params</span>[<span class="ruby-value str">"ACTN"</span>] <span class="ruby-operator">==</span> <span class="ruby-value str">"OK"</span>
|
164
|
-
15: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">params</span>[<span class="ruby-value str">"AREACODE"</span>]
|
165
|
-
16: <span class="ruby-keyword kw">else</span>
|
166
|
-
17: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
|
167
|
-
18: <span class="ruby-keyword kw">end</span>
|
168
|
-
19: <span class="ruby-keyword kw">end</span>
|
169
|
-
</pre>
|
170
|
-
</div>
|
171
|
-
</div>
|
172
|
-
</div>
|
173
|
-
|
174
|
-
<div id="method-M000020" class="method-detail">
|
175
|
-
<a name="M000020"></a>
|
176
|
-
|
177
|
-
<div class="method-heading">
|
178
|
-
<a href="#M000020" class="method-signature">
|
179
|
-
<span class="method-name">display</span><span class="method-args">()</span>
|
180
|
-
</a>
|
181
|
-
</div>
|
182
|
-
|
183
|
-
<div class="method-description">
|
184
|
-
<p>
|
185
|
-
画面情報を <tt><a href="../Display.html">Display</a></tt>
|
186
|
-
クラスのインスタンスで返す。
|
187
|
-
</p>
|
188
|
-
<p><a class="source-toggle" href="#"
|
189
|
-
onclick="toggleCode('M000020-source');return false;">[Source]</a></p>
|
190
|
-
<div class="method-source-code" id="M000020-source">
|
191
|
-
<pre>
|
192
|
-
<span class="ruby-comment cmt"># File lib/jpmobile/mobile/docomo.rb, line 67</span>
|
193
|
-
67: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">display</span>
|
194
|
-
68: <span class="ruby-ivar">@__display</span> <span class="ruby-operator">||=</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-keyword kw">nil</span>,<span class="ruby-keyword kw">nil</span>,
|
195
|
-
69: <span class="ruby-identifier">display_info</span>[<span class="ruby-identifier">:browser_width</span>],
|
196
|
-
70: <span class="ruby-identifier">display_info</span>[<span class="ruby-identifier">:browser_height</span>],
|
197
|
-
71: <span class="ruby-identifier">display_info</span>[<span class="ruby-identifier">:color_p</span>],
|
198
|
-
72: <span class="ruby-identifier">display_info</span>[<span class="ruby-identifier">:colors</span>])
|
199
|
-
73: <span class="ruby-keyword kw">end</span>
|
200
|
-
</pre>
|
201
|
-
</div>
|
202
|
-
</div>
|
203
|
-
</div>
|
204
|
-
|
205
|
-
<div id="method-M000018" class="method-detail">
|
206
|
-
<a name="M000018"></a>
|
207
|
-
|
208
|
-
<div class="method-heading">
|
209
|
-
<a href="#M000018" class="method-signature">
|
210
|
-
<span class="method-name">guid</span><span class="method-args">()</span>
|
211
|
-
</a>
|
212
|
-
</div>
|
213
|
-
|
214
|
-
<div class="method-description">
|
215
|
-
<p>
|
216
|
-
iモードIDを返す。
|
217
|
-
</p>
|
218
|
-
<p><a class="source-toggle" href="#"
|
219
|
-
onclick="toggleCode('M000018-source');return false;">[Source]</a></p>
|
220
|
-
<div class="method-source-code" id="M000018-source">
|
221
|
-
<pre>
|
222
|
-
<span class="ruby-comment cmt"># File lib/jpmobile/mobile/docomo.rb, line 57</span>
|
223
|
-
57: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">guid</span>
|
224
|
-
58: <span class="ruby-ivar">@request</span>.<span class="ruby-identifier">env</span>[<span class="ruby-value str">'HTTP_X_DCMGUID'</span>]
|
225
|
-
59: <span class="ruby-keyword kw">end</span>
|
226
|
-
</pre>
|
227
|
-
</div>
|
228
|
-
</div>
|
229
|
-
</div>
|
230
|
-
|
231
|
-
<div id="method-M000017" class="method-detail">
|
232
|
-
<a name="M000017"></a>
|
233
|
-
|
234
|
-
<div class="method-heading">
|
235
|
-
<a href="#M000017" class="method-signature">
|
236
|
-
<span class="method-name">icc</span><span class="method-args">()</span>
|
237
|
-
</a>
|
238
|
-
</div>
|
239
|
-
|
240
|
-
<div class="method-description">
|
241
|
-
<p>
|
242
|
-
FOMAカード製造番号があれば返す。無ければ <tt>nil</tt>
|
243
|
-
を返す。
|
244
|
-
</p>
|
245
|
-
<p><a class="source-toggle" href="#"
|
246
|
-
onclick="toggleCode('M000017-source');return false;">[Source]</a></p>
|
247
|
-
<div class="method-source-code" id="M000017-source">
|
248
|
-
<pre>
|
249
|
-
<span class="ruby-comment cmt"># File lib/jpmobile/mobile/docomo.rb, line 51</span>
|
250
|
-
51: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">icc</span>
|
251
|
-
52: <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">/icc([0-9a-zA-Z]{20})\)/</span>
|
252
|
-
53: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">$1</span>
|
253
|
-
54: <span class="ruby-keyword kw">end</span>
|
254
|
-
</pre>
|
255
|
-
</div>
|
256
|
-
</div>
|
257
|
-
</div>
|
258
|
-
|
259
|
-
<div id="method-M000016" class="method-detail">
|
260
|
-
<a name="M000016"></a>
|
261
|
-
|
262
|
-
<div class="method-heading">
|
263
|
-
<span class="method-name">ident_device</span><span class="method-args">()</span>
|
264
|
-
</div>
|
265
|
-
|
266
|
-
<div class="method-description">
|
267
|
-
<p>
|
268
|
-
Alias for <a href="Docomo.html#M000015">serial_number</a>
|
269
|
-
</p>
|
270
|
-
</div>
|
271
|
-
</div>
|
272
|
-
|
273
|
-
<div id="method-M000019" class="method-detail">
|
274
|
-
<a name="M000019"></a>
|
275
|
-
|
276
|
-
<div class="method-heading">
|
277
|
-
<a href="#M000019" class="method-signature">
|
278
|
-
<span class="method-name">ident_subscriber</span><span class="method-args">()</span>
|
279
|
-
</a>
|
280
|
-
</div>
|
281
|
-
|
282
|
-
<div class="method-description">
|
283
|
-
<p>
|
284
|
-
iモードID,
|
285
|
-
FOMAカード製造番号の順で調べ、あるものを返す。なければ
|
286
|
-
<tt>nil</tt> を返す。
|
287
|
-
</p>
|
288
|
-
<p><a class="source-toggle" href="#"
|
289
|
-
onclick="toggleCode('M000019-source');return false;">[Source]</a></p>
|
290
|
-
<div class="method-source-code" id="M000019-source">
|
291
|
-
<pre>
|
292
|
-
<span class="ruby-comment cmt"># File lib/jpmobile/mobile/docomo.rb, line 62</span>
|
293
|
-
62: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">ident_subscriber</span>
|
294
|
-
63: <span class="ruby-identifier">guid</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">icc</span>
|
295
|
-
64: <span class="ruby-keyword kw">end</span>
|
296
|
-
</pre>
|
297
|
-
</div>
|
298
|
-
</div>
|
299
|
-
</div>
|
300
|
-
|
301
|
-
<div id="method-M000014" class="method-detail">
|
302
|
-
<a name="M000014"></a>
|
303
|
-
|
304
|
-
<div class="method-heading">
|
305
|
-
<a href="#M000014" class="method-signature">
|
306
|
-
<span class="method-name">position</span><span class="method-args">()</span>
|
307
|
-
</a>
|
308
|
-
</div>
|
309
|
-
|
310
|
-
<div class="method-description">
|
311
|
-
<p>
|
312
|
-
位置情報があれば <a href="../Position.html">Position</a>
|
313
|
-
のインスタンスを返す。無ければ <tt>nil</tt> を返す。
|
314
|
-
</p>
|
315
|
-
<p><a class="source-toggle" href="#"
|
316
|
-
onclick="toggleCode('M000014-source');return false;">[Source]</a></p>
|
317
|
-
<div class="method-source-code" id="M000014-source">
|
318
|
-
<pre>
|
319
|
-
<span class="ruby-comment cmt"># File lib/jpmobile/mobile/docomo.rb, line 22</span>
|
320
|
-
22: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">position</span>
|
321
|
-
23: <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>
|
322
|
-
24: <span class="ruby-identifier">lat</span> = <span class="ruby-identifier">params</span>[<span class="ruby-value str">"lat"</span>] <span class="ruby-operator">||</span> <span class="ruby-identifier">params</span>[<span class="ruby-value str">"LAT"</span>]
|
323
|
-
25: <span class="ruby-identifier">lon</span> = <span class="ruby-identifier">params</span>[<span class="ruby-value str">"lon"</span>] <span class="ruby-operator">||</span> <span class="ruby-identifier">params</span>[<span class="ruby-value str">"LON"</span>]
|
324
|
-
26: <span class="ruby-identifier">geo</span> = <span class="ruby-identifier">params</span>[<span class="ruby-value str">"geo"</span>] <span class="ruby-operator">||</span> <span class="ruby-identifier">params</span>[<span class="ruby-value str">"GEO"</span>]
|
325
|
-
27: <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@__position</span> = <span class="ruby-keyword kw">nil</span> <span class="ruby-keyword kw">if</span> ( <span class="ruby-identifier">lat</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">lat</span> <span class="ruby-operator">==</span> <span class="ruby-value str">''</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">lon</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">lon</span> <span class="ruby-operator">==</span> <span class="ruby-value str">''</span> )
|
326
|
-
28: <span class="ruby-identifier">raise</span> <span class="ruby-value str">"Unsuppoted datum"</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">geo</span>.<span class="ruby-identifier">downcase</span> <span class="ruby-operator">!=</span> <span class="ruby-value str">"wgs84"</span>
|
327
|
-
29: <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>
|
328
|
-
30: <span class="ruby-identifier">raise</span> <span class="ruby-value str">"Unsuppoted"</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">lat</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/^([+-]\d+)\.(\d+)\.(\d+\.\d+)/</span>
|
329
|
-
31: <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>)
|
330
|
-
32: <span class="ruby-identifier">raise</span> <span class="ruby-value str">"Unsuppoted"</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">lon</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/^([+-]\d+)\.(\d+)\.(\d+\.\d+)/</span>
|
331
|
-
33: <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">$1</span>,<span class="ruby-identifier">$2</span>,<span class="ruby-identifier">$3</span>)
|
332
|
-
34: <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@__position</span> = <span class="ruby-identifier">pos</span>
|
333
|
-
35: <span class="ruby-keyword kw">end</span>
|
334
|
-
</pre>
|
335
|
-
</div>
|
336
|
-
</div>
|
337
|
-
</div>
|
338
|
-
|
339
|
-
<div id="method-M000015" class="method-detail">
|
340
|
-
<a name="M000015"></a>
|
341
|
-
|
342
|
-
<div class="method-heading">
|
343
|
-
<a href="#M000015" class="method-signature">
|
344
|
-
<span class="method-name">serial_number</span><span class="method-args">()</span>
|
345
|
-
</a>
|
346
|
-
</div>
|
347
|
-
|
348
|
-
<div class="method-description">
|
349
|
-
<p>
|
350
|
-
端末製造番号があれば返す。無ければ <tt>nil</tt>
|
351
|
-
を返す。
|
352
|
-
</p>
|
353
|
-
<p><a class="source-toggle" href="#"
|
354
|
-
onclick="toggleCode('M000015-source');return false;">[Source]</a></p>
|
355
|
-
<div class="method-source-code" id="M000015-source">
|
356
|
-
<pre>
|
357
|
-
<span class="ruby-comment cmt"># File lib/jpmobile/mobile/docomo.rb, line 38</span>
|
358
|
-
38: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">serial_number</span>
|
359
|
-
39: <span class="ruby-keyword kw">case</span> <span class="ruby-ivar">@request</span>.<span class="ruby-identifier">env</span>[<span class="ruby-value str">"HTTP_USER_AGENT"</span>]
|
360
|
-
40: <span class="ruby-keyword kw">when</span> <span class="ruby-regexp re">/ser([0-9a-zA-Z]{11})$/</span> <span class="ruby-comment cmt"># mova</span>
|
361
|
-
41: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">$1</span>
|
362
|
-
42: <span class="ruby-keyword kw">when</span> <span class="ruby-regexp re">/ser([0-9a-zA-Z]{15});/</span> <span class="ruby-comment cmt"># FOMA</span>
|
363
|
-
43: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">$1</span>
|
364
|
-
44: <span class="ruby-keyword kw">else</span>
|
365
|
-
45: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
|
366
|
-
46: <span class="ruby-keyword kw">end</span>
|
367
|
-
47: <span class="ruby-keyword kw">end</span>
|
368
|
-
</pre>
|
369
|
-
</div>
|
370
|
-
</div>
|
371
|
-
</div>
|
372
|
-
|
373
|
-
<div id="method-M000021" class="method-detail">
|
374
|
-
<a name="M000021"></a>
|
375
|
-
|
376
|
-
<div class="method-heading">
|
377
|
-
<a href="#M000021" class="method-signature">
|
378
|
-
<span class="method-name">supports_cookie?</span><span class="method-args">()</span>
|
379
|
-
</a>
|
380
|
-
</div>
|
381
|
-
|
382
|
-
<div class="method-description">
|
383
|
-
<p>
|
384
|
-
cookieに対応しているか?
|
385
|
-
</p>
|
386
|
-
<p><a class="source-toggle" href="#"
|
387
|
-
onclick="toggleCode('M000021-source');return false;">[Source]</a></p>
|
388
|
-
<div class="method-source-code" id="M000021-source">
|
389
|
-
<pre>
|
390
|
-
<span class="ruby-comment cmt"># File lib/jpmobile/mobile/docomo.rb, line 76</span>
|
391
|
-
76: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">supports_cookie?</span>
|
392
|
-
77: <span class="ruby-keyword kw">false</span>
|
393
|
-
78: <span class="ruby-keyword kw">end</span>
|
394
|
-
</pre>
|
395
|
-
</div>
|
396
|
-
</div>
|
397
|
-
</div>
|
398
|
-
|
399
|
-
|
400
|
-
</div>
|
401
|
-
|
402
|
-
|
403
|
-
</div>
|
404
|
-
|
405
|
-
|
406
|
-
<div id="validator-badges">
|
407
|
-
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
408
|
-
</div>
|
409
|
-
|
410
|
-
</body>
|
411
|
-
</html>
|
@@ -1,183 +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::Emobile</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::Emobile</td>
|
54
|
-
</tr>
|
55
|
-
<tr class="top-aligned-row">
|
56
|
-
<td><strong>In:</strong></td>
|
57
|
-
<td>
|
58
|
-
<a href="../../../files/lib/jpmobile/mobile/emobile_rb.html">
|
59
|
-
lib/jpmobile/mobile/emobile.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>EMOBILE携帯電話</h2>
|
85
|
-
|
86
|
-
</div>
|
87
|
-
|
88
|
-
|
89
|
-
</div>
|
90
|
-
|
91
|
-
<div id="method-list">
|
92
|
-
<h3 class="section-bar">Methods</h3>
|
93
|
-
|
94
|
-
<div class="name-list">
|
95
|
-
<a href="#M000042">em_uid</a>
|
96
|
-
<a href="#M000043">ident_subscriber</a>
|
97
|
-
</div>
|
98
|
-
</div>
|
99
|
-
|
100
|
-
</div>
|
101
|
-
|
102
|
-
|
103
|
-
<!-- if includes -->
|
104
|
-
|
105
|
-
<div id="section">
|
106
|
-
|
107
|
-
|
108
|
-
<div id="constants-list">
|
109
|
-
<h3 class="section-bar">Constants</h3>
|
110
|
-
|
111
|
-
<div class="name-list">
|
112
|
-
<table summary="Constants">
|
113
|
-
<tr class="top-aligned-row context-row">
|
114
|
-
<td class="context-item-name">USER_AGENT_REGEXP</td>
|
115
|
-
<td>=</td>
|
116
|
-
<td class="context-item-value">%r{^emobile/|^Mozilla/5.0 \(H11T; like Gecko; OpenBrowser\) NetFront/3.4$|^Mozilla/4.0 \(compatible; MSIE 6.0; Windows CE; IEMobile 7.7\) S11HT$}</td>
|
117
|
-
</tr>
|
118
|
-
</table>
|
119
|
-
</div>
|
120
|
-
</div>
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
<!-- if method_list -->
|
128
|
-
<div id="methods">
|
129
|
-
<h3 class="section-bar">Public Instance methods</h3>
|
130
|
-
|
131
|
-
<div id="method-M000042" class="method-detail">
|
132
|
-
<a name="M000042"></a>
|
133
|
-
|
134
|
-
<div class="method-heading">
|
135
|
-
<a href="#M000042" class="method-signature">
|
136
|
-
<span class="method-name">em_uid</span><span class="method-args">()</span>
|
137
|
-
</a>
|
138
|
-
</div>
|
139
|
-
|
140
|
-
<div class="method-description">
|
141
|
-
<p>
|
142
|
-
EMnet対応端末から通知されるユニークなユーザIDを取得する。
|
143
|
-
</p>
|
144
|
-
<p><a class="source-toggle" href="#"
|
145
|
-
onclick="toggleCode('M000042-source');return false;">[Source]</a></p>
|
146
|
-
<div class="method-source-code" id="M000042-source">
|
147
|
-
<pre>
|
148
|
-
<span class="ruby-comment cmt"># File lib/jpmobile/mobile/emobile.rb, line 10</span>
|
149
|
-
10: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">em_uid</span>
|
150
|
-
11: <span class="ruby-ivar">@request</span>.<span class="ruby-identifier">env</span>[<span class="ruby-value str">'HTTP_X_EM_UID'</span>]
|
151
|
-
12: <span class="ruby-keyword kw">end</span>
|
152
|
-
</pre>
|
153
|
-
</div>
|
154
|
-
</div>
|
155
|
-
</div>
|
156
|
-
|
157
|
-
<div id="method-M000043" class="method-detail">
|
158
|
-
<a name="M000043"></a>
|
159
|
-
|
160
|
-
<div class="method-heading">
|
161
|
-
<span class="method-name">ident_subscriber</span><span class="method-args">()</span>
|
162
|
-
</div>
|
163
|
-
|
164
|
-
<div class="method-description">
|
165
|
-
<p>
|
166
|
-
Alias for <a href="Emobile.html#M000042">em_uid</a>
|
167
|
-
</p>
|
168
|
-
</div>
|
169
|
-
</div>
|
170
|
-
|
171
|
-
|
172
|
-
</div>
|
173
|
-
|
174
|
-
|
175
|
-
</div>
|
176
|
-
|
177
|
-
|
178
|
-
<div id="validator-badges">
|
179
|
-
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
180
|
-
</div>
|
181
|
-
|
182
|
-
</body>
|
183
|
-
</html>
|