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,588 +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>Module: Jpmobile::Helpers</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>Module</strong></td>
|
53
|
-
<td class="class-name-in-header">Jpmobile::Helpers</td>
|
54
|
-
</tr>
|
55
|
-
<tr class="top-aligned-row">
|
56
|
-
<td><strong>In:</strong></td>
|
57
|
-
<td>
|
58
|
-
<a href="../../files/lib/jpmobile/helpers_rb.html">
|
59
|
-
lib/jpmobile/helpers.rb
|
60
|
-
</a>
|
61
|
-
<br />
|
62
|
-
</td>
|
63
|
-
</tr>
|
64
|
-
|
65
|
-
</table>
|
66
|
-
</div>
|
67
|
-
<!-- banner header -->
|
68
|
-
|
69
|
-
<div id="bodyContent">
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
<div id="contextContent">
|
74
|
-
|
75
|
-
<div id="description">
|
76
|
-
<p>
|
77
|
-
携帯電話端末に位置情報を要求するための、特殊なリンクを出力するヘルパー群。
|
78
|
-
多くのキャリアでは特殊なFORMでも位置情報を要求できる。
|
79
|
-
</p>
|
80
|
-
|
81
|
-
</div>
|
82
|
-
|
83
|
-
|
84
|
-
</div>
|
85
|
-
|
86
|
-
<div id="method-list">
|
87
|
-
<h3 class="section-bar">Methods</h3>
|
88
|
-
|
89
|
-
<div class="name-list">
|
90
|
-
<a href="#M000059">au_gps_link_to</a>
|
91
|
-
<a href="#M000058">au_gps_url_for</a>
|
92
|
-
<a href="#M000061">au_location_link_to</a>
|
93
|
-
<a href="#M000060">au_location_url_for</a>
|
94
|
-
<a href="#M000053">docomo_foma_gps_link_to</a>
|
95
|
-
<a href="#M000057">docomo_guid_link_to</a>
|
96
|
-
<a href="#M000055">docomo_openiarea_link_to</a>
|
97
|
-
<a href="#M000054">docomo_openiarea_url_for</a>
|
98
|
-
<a href="#M000056">docomo_utn_link_to</a>
|
99
|
-
<a href="#M000052">get_position_link_to</a>
|
100
|
-
<a href="#M000062">jphone_location_link_to</a>
|
101
|
-
<a href="#M000064">softbank_location_link_to</a>
|
102
|
-
<a href="#M000063">softbank_location_url_for</a>
|
103
|
-
<a href="#M000066">willcom_location_link_to</a>
|
104
|
-
<a href="#M000065">willcom_location_url_for</a>
|
105
|
-
</div>
|
106
|
-
</div>
|
107
|
-
|
108
|
-
</div>
|
109
|
-
|
110
|
-
|
111
|
-
<!-- if includes -->
|
112
|
-
|
113
|
-
<div id="section">
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
<!-- if method_list -->
|
123
|
-
<div id="methods">
|
124
|
-
<h3 class="section-bar">Public Instance methods</h3>
|
125
|
-
|
126
|
-
<div id="method-M000059" class="method-detail">
|
127
|
-
<a name="M000059"></a>
|
128
|
-
|
129
|
-
<div class="method-heading">
|
130
|
-
<a href="#M000059" class="method-signature">
|
131
|
-
<span class="method-name">au_gps_link_to</span><span class="method-args">(str, options={})</span>
|
132
|
-
</a>
|
133
|
-
</div>
|
134
|
-
|
135
|
-
<div class="method-description">
|
136
|
-
<p>
|
137
|
-
au GPS位置情報を取得するためのリンクを返す。
|
138
|
-
</p>
|
139
|
-
<p><a class="source-toggle" href="#"
|
140
|
-
onclick="toggleCode('M000059-source');return false;">[Source]</a></p>
|
141
|
-
<div class="method-source-code" id="M000059-source">
|
142
|
-
<pre>
|
143
|
-
<span class="ruby-comment cmt"># File lib/jpmobile/helpers.rb, line 88</span>
|
144
|
-
88: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">au_gps_link_to</span>(<span class="ruby-identifier">str</span>, <span class="ruby-identifier">options</span>={})
|
145
|
-
89: <span class="ruby-identifier">link_to_url</span>(<span class="ruby-identifier">str</span>, <span class="ruby-identifier">au_gps_url_for</span>(<span class="ruby-identifier">options</span>))
|
146
|
-
90: <span class="ruby-keyword kw">end</span>
|
147
|
-
</pre>
|
148
|
-
</div>
|
149
|
-
</div>
|
150
|
-
</div>
|
151
|
-
|
152
|
-
<div id="method-M000058" class="method-detail">
|
153
|
-
<a name="M000058"></a>
|
154
|
-
|
155
|
-
<div class="method-heading">
|
156
|
-
<a href="#M000058" class="method-signature">
|
157
|
-
<span class="method-name">au_gps_url_for</span><span class="method-args">(options={})</span>
|
158
|
-
</a>
|
159
|
-
</div>
|
160
|
-
|
161
|
-
<div class="method-description">
|
162
|
-
<p>
|
163
|
-
au GPS位置情報を取得するためのURLを返す。
|
164
|
-
</p>
|
165
|
-
<p><a class="source-toggle" href="#"
|
166
|
-
onclick="toggleCode('M000058-source');return false;">[Source]</a></p>
|
167
|
-
<div class="method-source-code" id="M000058-source">
|
168
|
-
<pre>
|
169
|
-
<span class="ruby-comment cmt"># File lib/jpmobile/helpers.rb, line 79</span>
|
170
|
-
79: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">au_gps_url_for</span>(<span class="ruby-identifier">options</span>={})
|
171
|
-
80: <span class="ruby-identifier">options</span> = <span class="ruby-identifier">options</span>.<span class="ruby-identifier">symbolize_keys</span>
|
172
|
-
81: <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:only_path</span>] = <span class="ruby-keyword kw">false</span>
|
173
|
-
82: <span class="ruby-identifier">datum</span> = (<span class="ruby-identifier">options</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">:datum</span>) <span class="ruby-operator">||</span> <span class="ruby-value">0</span> ).<span class="ruby-identifier">to_i</span> <span class="ruby-comment cmt"># 0:wgs84, 1:tokyo</span>
|
174
|
-
83: <span class="ruby-identifier">unit</span> = (<span class="ruby-identifier">options</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">:unit</span>) <span class="ruby-operator">||</span> <span class="ruby-value">0</span> ).<span class="ruby-identifier">to_i</span> <span class="ruby-comment cmt"># 0:dms, 1:deg</span>
|
175
|
-
84: <span class="ruby-node">"device:gpsone?url=#{CGI.escape(url_for(options))}&ver=1&datum=#{datum}&unit=#{unit}&acry=0&number=0"</span>
|
176
|
-
85: <span class="ruby-keyword kw">end</span>
|
177
|
-
</pre>
|
178
|
-
</div>
|
179
|
-
</div>
|
180
|
-
</div>
|
181
|
-
|
182
|
-
<div id="method-M000061" class="method-detail">
|
183
|
-
<a name="M000061"></a>
|
184
|
-
|
185
|
-
<div class="method-heading">
|
186
|
-
<a href="#M000061" class="method-signature">
|
187
|
-
<span class="method-name">au_location_link_to</span><span class="method-args">(str, options={})</span>
|
188
|
-
</a>
|
189
|
-
</div>
|
190
|
-
|
191
|
-
<div class="method-description">
|
192
|
-
<p>
|
193
|
-
au 簡易位置情報を取得するためのリンクを返す。
|
194
|
-
</p>
|
195
|
-
<p><a class="source-toggle" href="#"
|
196
|
-
onclick="toggleCode('M000061-source');return false;">[Source]</a></p>
|
197
|
-
<div class="method-source-code" id="M000061-source">
|
198
|
-
<pre>
|
199
|
-
<span class="ruby-comment cmt"># File lib/jpmobile/helpers.rb, line 100</span>
|
200
|
-
100: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">au_location_link_to</span>(<span class="ruby-identifier">str</span>, <span class="ruby-identifier">options</span>={})
|
201
|
-
101: <span class="ruby-identifier">link_to_url</span>(<span class="ruby-identifier">str</span>, <span class="ruby-identifier">au_location_url_for</span>(<span class="ruby-identifier">options</span>))
|
202
|
-
102: <span class="ruby-keyword kw">end</span>
|
203
|
-
</pre>
|
204
|
-
</div>
|
205
|
-
</div>
|
206
|
-
</div>
|
207
|
-
|
208
|
-
<div id="method-M000060" class="method-detail">
|
209
|
-
<a name="M000060"></a>
|
210
|
-
|
211
|
-
<div class="method-heading">
|
212
|
-
<a href="#M000060" class="method-signature">
|
213
|
-
<span class="method-name">au_location_url_for</span><span class="method-args">(options={})</span>
|
214
|
-
</a>
|
215
|
-
</div>
|
216
|
-
|
217
|
-
<div class="method-description">
|
218
|
-
<p>
|
219
|
-
au 簡易位置情報を取得するためのURLを返す。
|
220
|
-
</p>
|
221
|
-
<p><a class="source-toggle" href="#"
|
222
|
-
onclick="toggleCode('M000060-source');return false;">[Source]</a></p>
|
223
|
-
<div class="method-source-code" id="M000060-source">
|
224
|
-
<pre>
|
225
|
-
<span class="ruby-comment cmt"># File lib/jpmobile/helpers.rb, line 93</span>
|
226
|
-
93: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">au_location_url_for</span>(<span class="ruby-identifier">options</span>={})
|
227
|
-
94: <span class="ruby-identifier">options</span> = <span class="ruby-identifier">options</span>.<span class="ruby-identifier">symbolize_keys</span>
|
228
|
-
95: <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:only_path</span>] = <span class="ruby-keyword kw">false</span>
|
229
|
-
96: <span class="ruby-node">"device:location?url=#{CGI.escape(url_for(options))}"</span>
|
230
|
-
97: <span class="ruby-keyword kw">end</span>
|
231
|
-
</pre>
|
232
|
-
</div>
|
233
|
-
</div>
|
234
|
-
</div>
|
235
|
-
|
236
|
-
<div id="method-M000053" class="method-detail">
|
237
|
-
<a name="M000053"></a>
|
238
|
-
|
239
|
-
<div class="method-heading">
|
240
|
-
<a href="#M000053" class="method-signature">
|
241
|
-
<span class="method-name">docomo_foma_gps_link_to</span><span class="method-args">(str, options={})</span>
|
242
|
-
</a>
|
243
|
-
</div>
|
244
|
-
|
245
|
-
<div class="method-description">
|
246
|
-
<p>
|
247
|
-
DoCoMo FOMAでGPS位置情報を取得するためのリンクを返す。
|
248
|
-
</p>
|
249
|
-
<p><a class="source-toggle" href="#"
|
250
|
-
onclick="toggleCode('M000053-source');return false;">[Source]</a></p>
|
251
|
-
<div class="method-source-code" id="M000053-source">
|
252
|
-
<pre>
|
253
|
-
<span class="ruby-comment cmt"># File lib/jpmobile/helpers.rb, line 45</span>
|
254
|
-
45: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">docomo_foma_gps_link_to</span>(<span class="ruby-identifier">str</span>, <span class="ruby-identifier">options</span>={})
|
255
|
-
46: <span class="ruby-identifier">options</span> = <span class="ruby-identifier">options</span>.<span class="ruby-identifier">symbolize_keys</span>
|
256
|
-
47: <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:only_path</span>] = <span class="ruby-keyword kw">false</span>
|
257
|
-
48: <span class="ruby-keyword kw">return</span> <span class="ruby-node">%{<a href="#{url_for(options)}" lcs>#{str}</a>}</span>
|
258
|
-
49: <span class="ruby-keyword kw">end</span>
|
259
|
-
</pre>
|
260
|
-
</div>
|
261
|
-
</div>
|
262
|
-
</div>
|
263
|
-
|
264
|
-
<div id="method-M000057" class="method-detail">
|
265
|
-
<a name="M000057"></a>
|
266
|
-
|
267
|
-
<div class="method-heading">
|
268
|
-
<a href="#M000057" class="method-signature">
|
269
|
-
<span class="method-name">docomo_guid_link_to</span><span class="method-args">(str, options={})</span>
|
270
|
-
</a>
|
271
|
-
</div>
|
272
|
-
|
273
|
-
<div class="method-description">
|
274
|
-
<p>
|
275
|
-
DoCoMoでiモードIDを取得するためのリンクを返す。
|
276
|
-
</p>
|
277
|
-
<p><a class="source-toggle" href="#"
|
278
|
-
onclick="toggleCode('M000057-source');return false;">[Source]</a></p>
|
279
|
-
<div class="method-source-code" id="M000057-source">
|
280
|
-
<pre>
|
281
|
-
<span class="ruby-comment cmt"># File lib/jpmobile/helpers.rb, line 72</span>
|
282
|
-
72: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">docomo_guid_link_to</span>(<span class="ruby-identifier">str</span>, <span class="ruby-identifier">options</span>={})
|
283
|
-
73: <span class="ruby-identifier">options</span> = <span class="ruby-identifier">options</span>.<span class="ruby-identifier">symbolize_keys</span>
|
284
|
-
74: <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:guid</span>] = <span class="ruby-value str">"ON"</span>
|
285
|
-
75: <span class="ruby-identifier">link_to_url</span>(<span class="ruby-identifier">str</span>, <span class="ruby-identifier">url_for</span>(<span class="ruby-identifier">options</span>))
|
286
|
-
76: <span class="ruby-keyword kw">end</span>
|
287
|
-
</pre>
|
288
|
-
</div>
|
289
|
-
</div>
|
290
|
-
</div>
|
291
|
-
|
292
|
-
<div id="method-M000055" class="method-detail">
|
293
|
-
<a name="M000055"></a>
|
294
|
-
|
295
|
-
<div class="method-heading">
|
296
|
-
<a href="#M000055" class="method-signature">
|
297
|
-
<span class="method-name">docomo_openiarea_link_to</span><span class="method-args">(str, options={})</span>
|
298
|
-
</a>
|
299
|
-
</div>
|
300
|
-
|
301
|
-
<div class="method-description">
|
302
|
-
<p>
|
303
|
-
DoCoMoでオープンiエリアを取得するためのリンクを返す。
|
304
|
-
</p>
|
305
|
-
<p><a class="source-toggle" href="#"
|
306
|
-
onclick="toggleCode('M000055-source');return false;">[Source]</a></p>
|
307
|
-
<div class="method-source-code" id="M000055-source">
|
308
|
-
<pre>
|
309
|
-
<span class="ruby-comment cmt"># File lib/jpmobile/helpers.rb, line 60</span>
|
310
|
-
60: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">docomo_openiarea_link_to</span>(<span class="ruby-identifier">str</span>, <span class="ruby-identifier">options</span>={})
|
311
|
-
61: <span class="ruby-identifier">link_to_url</span>(<span class="ruby-identifier">str</span>, <span class="ruby-identifier">docomo_openiarea_url_for</span>(<span class="ruby-identifier">options</span>))
|
312
|
-
62: <span class="ruby-keyword kw">end</span>
|
313
|
-
</pre>
|
314
|
-
</div>
|
315
|
-
</div>
|
316
|
-
</div>
|
317
|
-
|
318
|
-
<div id="method-M000054" class="method-detail">
|
319
|
-
<a name="M000054"></a>
|
320
|
-
|
321
|
-
<div class="method-heading">
|
322
|
-
<a href="#M000054" class="method-signature">
|
323
|
-
<span class="method-name">docomo_openiarea_url_for</span><span class="method-args">(options={})</span>
|
324
|
-
</a>
|
325
|
-
</div>
|
326
|
-
|
327
|
-
<div class="method-description">
|
328
|
-
<p>
|
329
|
-
DoCoMoでオープンiエリアを取得するためのURLを返す。
|
330
|
-
</p>
|
331
|
-
<p><a class="source-toggle" href="#"
|
332
|
-
onclick="toggleCode('M000054-source');return false;">[Source]</a></p>
|
333
|
-
<div class="method-source-code" id="M000054-source">
|
334
|
-
<pre>
|
335
|
-
<span class="ruby-comment cmt"># File lib/jpmobile/helpers.rb, line 52</span>
|
336
|
-
52: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">docomo_openiarea_url_for</span>(<span class="ruby-identifier">options</span>={})
|
337
|
-
53: <span class="ruby-identifier">options</span> = <span class="ruby-identifier">options</span>.<span class="ruby-identifier">symbolize_keys</span>
|
338
|
-
54: <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:only_path</span>] = <span class="ruby-keyword kw">false</span>
|
339
|
-
55: <span class="ruby-identifier">posinfo</span> = <span class="ruby-identifier">options</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">:posinfo</span>) <span class="ruby-operator">||</span> <span class="ruby-value str">"1"</span> <span class="ruby-comment cmt"># 基地局情報を元に測位した緯度経度情報を要求 </span>
|
340
|
-
56: <span class="ruby-node">"http://w1m.docomo.ne.jp/cp/iarea?ecode=OPENAREACODE&msn=OPENAREAKEY&posinfo=#{posinfo}&nl=#{CGI.escape(url_for(options))}"</span>
|
341
|
-
57: <span class="ruby-keyword kw">end</span>
|
342
|
-
</pre>
|
343
|
-
</div>
|
344
|
-
</div>
|
345
|
-
</div>
|
346
|
-
|
347
|
-
<div id="method-M000056" class="method-detail">
|
348
|
-
<a name="M000056"></a>
|
349
|
-
|
350
|
-
<div class="method-heading">
|
351
|
-
<a href="#M000056" class="method-signature">
|
352
|
-
<span class="method-name">docomo_utn_link_to</span><span class="method-args">(str, options={})</span>
|
353
|
-
</a>
|
354
|
-
</div>
|
355
|
-
|
356
|
-
<div class="method-description">
|
357
|
-
<p>
|
358
|
-
DoCoMoで端末製造番号等を取得するためのリンクを返す。
|
359
|
-
</p>
|
360
|
-
<p><a class="source-toggle" href="#"
|
361
|
-
onclick="toggleCode('M000056-source');return false;">[Source]</a></p>
|
362
|
-
<div class="method-source-code" id="M000056-source">
|
363
|
-
<pre>
|
364
|
-
<span class="ruby-comment cmt"># File lib/jpmobile/helpers.rb, line 65</span>
|
365
|
-
65: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">docomo_utn_link_to</span>(<span class="ruby-identifier">str</span>, <span class="ruby-identifier">options</span>={})
|
366
|
-
66: <span class="ruby-identifier">options</span> = <span class="ruby-identifier">options</span>.<span class="ruby-identifier">symbolize_keys</span>
|
367
|
-
67: <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:only_path</span>] = <span class="ruby-keyword kw">false</span>
|
368
|
-
68: <span class="ruby-keyword kw">return</span> <span class="ruby-node">%{<a href="#{url_for(options)}" utn>#{str}</a>}</span>
|
369
|
-
69: <span class="ruby-keyword kw">end</span>
|
370
|
-
</pre>
|
371
|
-
</div>
|
372
|
-
</div>
|
373
|
-
</div>
|
374
|
-
|
375
|
-
<div id="method-M000052" class="method-detail">
|
376
|
-
<a name="M000052"></a>
|
377
|
-
|
378
|
-
<div class="method-heading">
|
379
|
-
<a href="#M000052" class="method-signature">
|
380
|
-
<span class="method-name">get_position_link_to</span><span class="method-args">(str=nil, options={})</span>
|
381
|
-
</a>
|
382
|
-
</div>
|
383
|
-
|
384
|
-
<div class="method-description">
|
385
|
-
<p>
|
386
|
-
位置情報(緯度経度がとれるもの。オープンiエリアをのぞく)要求するリンクを作成する。
|
387
|
-
位置情報を受け取るページを <tt>url_for</tt>
|
388
|
-
に渡す引数の形式で <tt>options</tt> に指定する。 :show_all
|
389
|
-
=> <tt>true</tt>
|
390
|
-
とするとキャリア判別を行わず全てキャリアのリンクを返す。
|
391
|
-
第1引数に文字列を与えるとその文字列をアンカーテキストにする。
|
392
|
-
第1引数がHashの場合はデフォルトのアンカーテキストを出力する。
|
393
|
-
</p>
|
394
|
-
<p><a class="source-toggle" href="#"
|
395
|
-
onclick="toggleCode('M000052-source');return false;">[Source]</a></p>
|
396
|
-
<div class="method-source-code" id="M000052-source">
|
397
|
-
<pre>
|
398
|
-
<span class="ruby-comment cmt"># File lib/jpmobile/helpers.rb, line 11</span>
|
399
|
-
11: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_position_link_to</span>(<span class="ruby-identifier">str</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">options</span>={})
|
400
|
-
12: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">str</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Hash</span>)
|
401
|
-
13: <span class="ruby-identifier">options</span> = <span class="ruby-identifier">str</span>
|
402
|
-
14: <span class="ruby-identifier">str</span> = <span class="ruby-keyword kw">nil</span>
|
403
|
-
15: <span class="ruby-keyword kw">end</span>
|
404
|
-
16: <span class="ruby-identifier">options</span> = <span class="ruby-identifier">options</span>.<span class="ruby-identifier">symbolize_keys</span>
|
405
|
-
17: <span class="ruby-identifier">show_all</span> = <span class="ruby-identifier">options</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">:show_all</span>)
|
406
|
-
18:
|
407
|
-
19: <span class="ruby-comment cmt"># TODO: コード汚い</span>
|
408
|
-
20: <span class="ruby-identifier">s</span> = []
|
409
|
-
21: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">show_all</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">request</span>.<span class="ruby-identifier">mobile</span>.<span class="ruby-identifier">instance_of?</span>(<span class="ruby-constant">Mobile</span><span class="ruby-operator">::</span><span class="ruby-constant">Docomo</span>)
|
410
|
-
22: <span class="ruby-identifier">s</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">docomo_foma_gps_link_to</span>(<span class="ruby-identifier">str</span><span class="ruby-operator">||</span><span class="ruby-value str">"DoCoMo FOMA(GPS)"</span>, <span class="ruby-identifier">options</span>)
|
411
|
-
23: <span class="ruby-keyword kw">end</span>
|
412
|
-
24: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">show_all</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">request</span>.<span class="ruby-identifier">mobile</span>.<span class="ruby-identifier">instance_of?</span>(<span class="ruby-constant">Mobile</span><span class="ruby-operator">::</span><span class="ruby-constant">Au</span>)
|
413
|
-
25: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">show_all</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">request</span>.<span class="ruby-identifier">mobile</span>.<span class="ruby-identifier">supports_gps?</span>
|
414
|
-
26: <span class="ruby-identifier">s</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">au_gps_link_to</span>(<span class="ruby-identifier">str</span><span class="ruby-operator">||</span><span class="ruby-value str">"au(GPS)"</span>, <span class="ruby-identifier">options</span>)
|
415
|
-
27: <span class="ruby-keyword kw">end</span>
|
416
|
-
28: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">show_all</span> <span class="ruby-operator">||</span> (<span class="ruby-operator">!</span>(<span class="ruby-identifier">request</span>.<span class="ruby-identifier">mobile</span>.<span class="ruby-identifier">supports_gps?</span>) <span class="ruby-operator">&&</span> <span class="ruby-identifier">request</span>.<span class="ruby-identifier">mobile</span>.<span class="ruby-identifier">supports_location?</span>)
|
417
|
-
29: <span class="ruby-identifier">s</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">au_location_link_to</span>(<span class="ruby-identifier">str</span><span class="ruby-operator">||</span><span class="ruby-value str">"au(antenna)"</span>, <span class="ruby-identifier">options</span>)
|
418
|
-
30: <span class="ruby-keyword kw">end</span>
|
419
|
-
31: <span class="ruby-keyword kw">end</span>
|
420
|
-
32: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">show_all</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">request</span>.<span class="ruby-identifier">mobile</span>.<span class="ruby-identifier">instance_of?</span>(<span class="ruby-constant">Mobile</span><span class="ruby-operator">::</span><span class="ruby-constant">Jphone</span>)
|
421
|
-
33: <span class="ruby-identifier">s</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">jphone_location_link_to</span>(<span class="ruby-identifier">str</span><span class="ruby-operator">||</span><span class="ruby-value str">"Softbank(antenna)"</span>, <span class="ruby-identifier">options</span>)
|
422
|
-
34: <span class="ruby-keyword kw">end</span>
|
423
|
-
35: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">show_all</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">request</span>.<span class="ruby-identifier">mobile</span>.<span class="ruby-identifier">instance_of?</span>(<span class="ruby-constant">Mobile</span><span class="ruby-operator">::</span><span class="ruby-constant">Vodafone</span>) <span class="ruby-operator">||</span> <span class="ruby-identifier">request</span>.<span class="ruby-identifier">mobile</span>.<span class="ruby-identifier">instance_of?</span>(<span class="ruby-constant">Mobile</span><span class="ruby-operator">::</span><span class="ruby-constant">Softbank</span>)
|
424
|
-
36: <span class="ruby-identifier">s</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">softbank_location_link_to</span>(<span class="ruby-identifier">str</span><span class="ruby-operator">||</span><span class="ruby-value str">"Softbank 3G(GPS)"</span>, <span class="ruby-identifier">options</span>)
|
425
|
-
37: <span class="ruby-keyword kw">end</span>
|
426
|
-
38: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">show_all</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">request</span>.<span class="ruby-identifier">mobile</span>.<span class="ruby-identifier">instance_of?</span>(<span class="ruby-constant">Mobile</span><span class="ruby-operator">::</span><span class="ruby-constant">Willcom</span>)
|
427
|
-
39: <span class="ruby-identifier">s</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">willcom_location_link_to</span>(<span class="ruby-identifier">str</span><span class="ruby-operator">||</span><span class="ruby-value str">"Willcom"</span>, <span class="ruby-identifier">options</span>)
|
428
|
-
40: <span class="ruby-keyword kw">end</span>
|
429
|
-
41: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">s</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">"<br />\n"</span>)
|
430
|
-
42: <span class="ruby-keyword kw">end</span>
|
431
|
-
</pre>
|
432
|
-
</div>
|
433
|
-
</div>
|
434
|
-
</div>
|
435
|
-
|
436
|
-
<div id="method-M000062" class="method-detail">
|
437
|
-
<a name="M000062"></a>
|
438
|
-
|
439
|
-
<div class="method-heading">
|
440
|
-
<a href="#M000062" class="method-signature">
|
441
|
-
<span class="method-name">jphone_location_link_to</span><span class="method-args">(str,options={})</span>
|
442
|
-
</a>
|
443
|
-
</div>
|
444
|
-
|
445
|
-
<div class="method-description">
|
446
|
-
<p>
|
447
|
-
J-PHONE 位置情報 (基地局)
|
448
|
-
を取得するためのリンクを返す。
|
449
|
-
</p>
|
450
|
-
<p><a class="source-toggle" href="#"
|
451
|
-
onclick="toggleCode('M000062-source');return false;">[Source]</a></p>
|
452
|
-
<div class="method-source-code" id="M000062-source">
|
453
|
-
<pre>
|
454
|
-
<span class="ruby-comment cmt"># File lib/jpmobile/helpers.rb, line 105</span>
|
455
|
-
105: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">jphone_location_link_to</span>(<span class="ruby-identifier">str</span>,<span class="ruby-identifier">options</span>={})
|
456
|
-
106: <span class="ruby-identifier">options</span> = <span class="ruby-identifier">options</span>.<span class="ruby-identifier">symbolize_keys</span>
|
457
|
-
107: <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:only_path</span>] = <span class="ruby-keyword kw">false</span>
|
458
|
-
108: <span class="ruby-keyword kw">return</span> <span class="ruby-node">%{<a z href="#{url_for(options)}">#{str}</a>}</span>
|
459
|
-
109: <span class="ruby-keyword kw">end</span>
|
460
|
-
</pre>
|
461
|
-
</div>
|
462
|
-
</div>
|
463
|
-
</div>
|
464
|
-
|
465
|
-
<div id="method-M000064" class="method-detail">
|
466
|
-
<a name="M000064"></a>
|
467
|
-
|
468
|
-
<div class="method-heading">
|
469
|
-
<a href="#M000064" class="method-signature">
|
470
|
-
<span class="method-name">softbank_location_link_to</span><span class="method-args">(str,options={})</span>
|
471
|
-
</a>
|
472
|
-
</div>
|
473
|
-
|
474
|
-
<div class="method-description">
|
475
|
-
<p>
|
476
|
-
Softbank(含むVodafone
|
477
|
-
3G)で位置情報を取得するためのリンクを返す。
|
478
|
-
</p>
|
479
|
-
<p><a class="source-toggle" href="#"
|
480
|
-
onclick="toggleCode('M000064-source');return false;">[Source]</a></p>
|
481
|
-
<div class="method-source-code" id="M000064-source">
|
482
|
-
<pre>
|
483
|
-
<span class="ruby-comment cmt"># File lib/jpmobile/helpers.rb, line 120</span>
|
484
|
-
120: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">softbank_location_link_to</span>(<span class="ruby-identifier">str</span>,<span class="ruby-identifier">options</span>={})
|
485
|
-
121: <span class="ruby-identifier">link_to_url</span>(<span class="ruby-identifier">str</span>,<span class="ruby-identifier">softbank_location_url_for</span>(<span class="ruby-identifier">options</span>))
|
486
|
-
122: <span class="ruby-keyword kw">end</span>
|
487
|
-
</pre>
|
488
|
-
</div>
|
489
|
-
</div>
|
490
|
-
</div>
|
491
|
-
|
492
|
-
<div id="method-M000063" class="method-detail">
|
493
|
-
<a name="M000063"></a>
|
494
|
-
|
495
|
-
<div class="method-heading">
|
496
|
-
<a href="#M000063" class="method-signature">
|
497
|
-
<span class="method-name">softbank_location_url_for</span><span class="method-args">(options={})</span>
|
498
|
-
</a>
|
499
|
-
</div>
|
500
|
-
|
501
|
-
<div class="method-description">
|
502
|
-
<p>
|
503
|
-
Softbank(含むVodafone
|
504
|
-
3G)で位置情報を取得するためのURLを返す。
|
505
|
-
</p>
|
506
|
-
<p><a class="source-toggle" href="#"
|
507
|
-
onclick="toggleCode('M000063-source');return false;">[Source]</a></p>
|
508
|
-
<div class="method-source-code" id="M000063-source">
|
509
|
-
<pre>
|
510
|
-
<span class="ruby-comment cmt"># File lib/jpmobile/helpers.rb, line 112</span>
|
511
|
-
112: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">softbank_location_url_for</span>(<span class="ruby-identifier">options</span>={})
|
512
|
-
113: <span class="ruby-identifier">options</span> = <span class="ruby-identifier">options</span>.<span class="ruby-identifier">symbolize_keys</span>
|
513
|
-
114: <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:only_path</span>] = <span class="ruby-keyword kw">false</span>
|
514
|
-
115: <span class="ruby-identifier">mode</span> = <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:mode</span>] <span class="ruby-operator">||</span> <span class="ruby-value str">"auto"</span>
|
515
|
-
116: <span class="ruby-node">"location:#{mode}?url=#{url_for(options)}"</span>
|
516
|
-
117: <span class="ruby-keyword kw">end</span>
|
517
|
-
</pre>
|
518
|
-
</div>
|
519
|
-
</div>
|
520
|
-
</div>
|
521
|
-
|
522
|
-
<div id="method-M000066" class="method-detail">
|
523
|
-
<a name="M000066"></a>
|
524
|
-
|
525
|
-
<div class="method-heading">
|
526
|
-
<a href="#M000066" class="method-signature">
|
527
|
-
<span class="method-name">willcom_location_link_to</span><span class="method-args">(str,options={})</span>
|
528
|
-
</a>
|
529
|
-
</div>
|
530
|
-
|
531
|
-
<div class="method-description">
|
532
|
-
<p>
|
533
|
-
Willcom 基地局位置情報を取得するためのリンクを返す。
|
534
|
-
</p>
|
535
|
-
<p><a class="source-toggle" href="#"
|
536
|
-
onclick="toggleCode('M000066-source');return false;">[Source]</a></p>
|
537
|
-
<div class="method-source-code" id="M000066-source">
|
538
|
-
<pre>
|
539
|
-
<span class="ruby-comment cmt"># File lib/jpmobile/helpers.rb, line 132</span>
|
540
|
-
132: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">willcom_location_link_to</span>(<span class="ruby-identifier">str</span>,<span class="ruby-identifier">options</span>={})
|
541
|
-
133: <span class="ruby-identifier">link_to_url</span>(<span class="ruby-identifier">str</span>, <span class="ruby-identifier">willcom_location_url_for</span>(<span class="ruby-identifier">options</span>))
|
542
|
-
134: <span class="ruby-keyword kw">end</span>
|
543
|
-
</pre>
|
544
|
-
</div>
|
545
|
-
</div>
|
546
|
-
</div>
|
547
|
-
|
548
|
-
<div id="method-M000065" class="method-detail">
|
549
|
-
<a name="M000065"></a>
|
550
|
-
|
551
|
-
<div class="method-heading">
|
552
|
-
<a href="#M000065" class="method-signature">
|
553
|
-
<span class="method-name">willcom_location_url_for</span><span class="method-args">(options={})</span>
|
554
|
-
</a>
|
555
|
-
</div>
|
556
|
-
|
557
|
-
<div class="method-description">
|
558
|
-
<p>
|
559
|
-
Willcom 基地局位置情報を取得するためのURLを返す。
|
560
|
-
</p>
|
561
|
-
<p><a class="source-toggle" href="#"
|
562
|
-
onclick="toggleCode('M000065-source');return false;">[Source]</a></p>
|
563
|
-
<div class="method-source-code" id="M000065-source">
|
564
|
-
<pre>
|
565
|
-
<span class="ruby-comment cmt"># File lib/jpmobile/helpers.rb, line 125</span>
|
566
|
-
125: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">willcom_location_url_for</span>(<span class="ruby-identifier">options</span>={})
|
567
|
-
126: <span class="ruby-identifier">options</span> = <span class="ruby-identifier">options</span>.<span class="ruby-identifier">symbolize_keys</span>
|
568
|
-
127: <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:only_path</span>] = <span class="ruby-keyword kw">false</span>
|
569
|
-
128: <span class="ruby-node">"http://location.request/dummy.cgi?my=#{url_for(options)}&pos=$location"</span>
|
570
|
-
129: <span class="ruby-keyword kw">end</span>
|
571
|
-
</pre>
|
572
|
-
</div>
|
573
|
-
</div>
|
574
|
-
</div>
|
575
|
-
|
576
|
-
|
577
|
-
</div>
|
578
|
-
|
579
|
-
|
580
|
-
</div>
|
581
|
-
|
582
|
-
|
583
|
-
<div id="validator-badges">
|
584
|
-
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
585
|
-
</div>
|
586
|
-
|
587
|
-
</body>
|
588
|
-
</html>
|