jpmobile 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/README +32 -10
- data/Rakefile +8 -8
- data/doc/classes/ActionController.html +120 -0
- data/doc/classes/ActionController/AbstractRequest.html +118 -0
- data/doc/classes/ActionController/CgiRequest.html +160 -0
- data/doc/classes/ActionView.html +101 -0
- data/doc/classes/DatumConv.html +324 -0
- data/doc/classes/Jpmobile/Display.html +333 -0
- data/doc/classes/Jpmobile/Emoticon.html +467 -0
- data/doc/classes/Jpmobile/Filter.html +120 -0
- data/doc/classes/Jpmobile/Filter/ApplyOnlyForMobile.html +172 -0
- data/doc/classes/Jpmobile/Filter/Base.html +269 -0
- data/doc/classes/Jpmobile/Filter/Emoticon.html +118 -0
- data/doc/classes/Jpmobile/Filter/Emoticon/Inner.html +184 -0
- data/doc/classes/Jpmobile/Filter/Emoticon/Outer.html +207 -0
- data/doc/classes/Jpmobile/Filter/FilterTable.html +178 -0
- data/doc/classes/Jpmobile/Filter/HankakuKana.html +126 -0
- data/doc/classes/Jpmobile/Filter/Sjis.html +271 -0
- data/doc/classes/Jpmobile/Helpers.html +588 -0
- data/doc/classes/Jpmobile/Mobile.html +150 -0
- data/doc/classes/Jpmobile/Mobile/AbstractMobile.html +389 -0
- data/doc/classes/Jpmobile/Mobile/Au.html +420 -0
- data/doc/classes/Jpmobile/Mobile/Ddipocket.html +138 -0
- data/doc/classes/Jpmobile/Mobile/Docomo.html +411 -0
- data/doc/classes/Jpmobile/Mobile/Emobile.html +183 -0
- data/doc/classes/Jpmobile/Mobile/Jphone.html +212 -0
- data/doc/classes/Jpmobile/Mobile/Softbank.html +344 -0
- data/doc/classes/Jpmobile/Mobile/Vodafone.html +176 -0
- data/doc/classes/Jpmobile/Mobile/Willcom.html +211 -0
- data/doc/classes/Jpmobile/Position.html +384 -0
- data/doc/classes/Jpmobile/RequestWithMobile.html +263 -0
- data/doc/created.rid +1 -0
- data/doc/files/CHANGELOG.html +110 -0
- data/doc/files/README.html +455 -0
- data/doc/files/lib/jpmobile/datum_conv_rb.html +110 -0
- data/doc/files/lib/jpmobile/emoticon/au_rb.html +124 -0
- data/doc/files/lib/jpmobile/emoticon/conversion_table_rb.html +124 -0
- data/doc/files/lib/jpmobile/emoticon/docomo_rb.html +119 -0
- data/doc/files/lib/jpmobile/emoticon/softbank_rb.html +119 -0
- data/doc/files/lib/jpmobile/emoticon/z_combine_rb.html +101 -0
- data/doc/files/lib/jpmobile/emoticon_rb.html +101 -0
- data/doc/files/lib/jpmobile/filter_rb.html +115 -0
- data/doc/files/lib/jpmobile/helpers_rb.html +105 -0
- data/doc/files/lib/jpmobile/hook_abstract_request_rb.html +108 -0
- data/doc/files/lib/jpmobile/hook_action_controller_rb.html +101 -0
- data/doc/files/lib/jpmobile/hook_action_view_rb.html +110 -0
- data/doc/files/lib/jpmobile/mobile/abstract_mobile_rb.html +108 -0
- data/doc/files/lib/jpmobile/mobile/au_rb.html +112 -0
- data/doc/files/lib/jpmobile/mobile/display_rb.html +111 -0
- data/doc/files/lib/jpmobile/mobile/docomo_rb.html +105 -0
- data/doc/files/lib/jpmobile/mobile/emobile_rb.html +105 -0
- data/doc/files/lib/jpmobile/mobile/softbank_rb.html +115 -0
- data/doc/files/lib/jpmobile/mobile/willcom_rb.html +108 -0
- data/doc/files/lib/jpmobile/mobile/z_display_info_docomo_rb.html +114 -0
- data/doc/files/lib/jpmobile/mobile/z_ip_addresses_au_rb.html +114 -0
- data/doc/files/lib/jpmobile/mobile/z_ip_addresses_docomo_rb.html +124 -0
- data/doc/files/lib/jpmobile/mobile/z_ip_addresses_emobile_rb.html +111 -0
- data/doc/files/lib/jpmobile/mobile/z_ip_addresses_softbank_rb.html +124 -0
- data/doc/files/lib/jpmobile/mobile/z_ip_addresses_willcom_rb.html +114 -0
- data/doc/files/lib/jpmobile/position_rb.html +105 -0
- data/doc/files/lib/jpmobile/request_with_mobile_rb.html +111 -0
- data/doc/files/lib/jpmobile/trans_sid_rb.html +118 -0
- data/doc/files/lib/jpmobile/version_rb.html +101 -0
- data/doc/files/lib/jpmobile_rb.html +101 -0
- data/doc/fr_class_index.html +55 -0
- data/doc/fr_file_index.html +58 -0
- data/doc/fr_method_index.html +134 -0
- data/doc/index.html +24 -0
- data/doc/rdoc-style.css +208 -0
- data/lib/jpmobile.rb +32 -1
- data/lib/jpmobile/emoticon.rb +18 -0
- data/lib/jpmobile/emoticon/au.rb +643 -0
- data/lib/jpmobile/filter.rb +5 -1
- data/lib/jpmobile/helpers.rb +9 -1
- data/lib/jpmobile/hook_abstract_request.rb +3 -24
- data/lib/jpmobile/hook_action_controller.rb +2 -2
- data/lib/jpmobile/hook_action_view.rb +41 -8
- data/lib/jpmobile/mobile/abstract_mobile.rb +18 -12
- data/lib/jpmobile/mobile/au.rb +11 -5
- data/lib/jpmobile/mobile/docomo.rb +27 -11
- data/lib/jpmobile/mobile/emobile.rb +15 -0
- data/lib/jpmobile/mobile/softbank.rb +11 -7
- data/lib/jpmobile/mobile/willcom.rb +5 -2
- data/lib/jpmobile/mobile/z_display_info_docomo.rb +343 -219
- data/lib/jpmobile/mobile/z_ip_addresses_au.rb +4 -1
- data/lib/jpmobile/mobile/z_ip_addresses_docomo.rb +10 -0
- data/lib/jpmobile/mobile/z_ip_addresses_emobile.rb +10 -0
- data/lib/jpmobile/mobile/{z_ip_addresses.rb → z_ip_addresses_softbank.rb} +2 -13
- data/lib/jpmobile/mobile/z_ip_addresses_willcom.rb +20 -1
- data/lib/jpmobile/position.rb +2 -2
- data/lib/jpmobile/request_with_mobile.rb +44 -0
- data/lib/jpmobile/trans_sid.rb +52 -14
- data/lib/jpmobile/version.rb +1 -1
- data/test/au_test.rb +94 -63
- data/test/autoload_test.rb +49 -0
- data/test/docomo_test.rb +92 -59
- data/test/emoticon_functional_test.rb +30 -3
- data/test/filter_test.rb +0 -64
- data/test/helper.rb +8 -1
- data/test/helpers_test.rb +14 -13
- data/test/softbank_test.rb +113 -85
- data/test/willcom_test.rb +30 -20
- data/tools/generate_au_emoticon_table.rb +12 -3
- data/tools/update_display_info_docomo.rb +0 -0
- data/tools/update_ip_addresses_au.rb +1 -1
- data/tools/update_ip_addresses_willcom.rb +1 -1
- metadata +135 -54
- data/test/filter_functional_test.rb +0 -146
@@ -0,0 +1,118 @@
|
|
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::Filter::Emoticon</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::Filter::Emoticon</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../../../files/lib/jpmobile/filter_rb.html">
|
59
|
+
lib/jpmobile/filter.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
|
+
</p>
|
79
|
+
|
80
|
+
</div>
|
81
|
+
|
82
|
+
|
83
|
+
</div>
|
84
|
+
|
85
|
+
|
86
|
+
</div>
|
87
|
+
|
88
|
+
|
89
|
+
<!-- if includes -->
|
90
|
+
|
91
|
+
<div id="section">
|
92
|
+
|
93
|
+
<div id="class-list">
|
94
|
+
<h3 class="section-bar">Classes and Modules</h3>
|
95
|
+
|
96
|
+
Class <a href="Emoticon/Inner.html" class="link">Jpmobile::Filter::Emoticon::Inner</a><br />
|
97
|
+
Class <a href="Emoticon/Outer.html" class="link">Jpmobile::Filter::Emoticon::Outer</a><br />
|
98
|
+
|
99
|
+
</div>
|
100
|
+
|
101
|
+
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
<!-- if method_list -->
|
108
|
+
|
109
|
+
|
110
|
+
</div>
|
111
|
+
|
112
|
+
|
113
|
+
<div id="validator-badges">
|
114
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
115
|
+
</div>
|
116
|
+
|
117
|
+
</body>
|
118
|
+
</html>
|
@@ -0,0 +1,184 @@
|
|
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::Filter::Emoticon::Inner</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::Filter::Emoticon::Inner</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../../../../files/lib/jpmobile/filter_rb.html">
|
59
|
+
lib/jpmobile/filter.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
|
+
Base
|
69
|
+
</td>
|
70
|
+
</tr>
|
71
|
+
</table>
|
72
|
+
</div>
|
73
|
+
<!-- banner header -->
|
74
|
+
|
75
|
+
<div id="bodyContent">
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
<div id="contextContent">
|
80
|
+
|
81
|
+
<div id="description">
|
82
|
+
<p>
|
83
|
+
絵文字<a href="Inner.html">Inner</a>
|
84
|
+
Unicode数値文字参照とUTF-8を相互に変換
|
85
|
+
</p>
|
86
|
+
|
87
|
+
</div>
|
88
|
+
|
89
|
+
|
90
|
+
</div>
|
91
|
+
|
92
|
+
<div id="method-list">
|
93
|
+
<h3 class="section-bar">Methods</h3>
|
94
|
+
|
95
|
+
<div class="name-list">
|
96
|
+
<a href="#M000070">to_external</a>
|
97
|
+
<a href="#M000069">to_internal</a>
|
98
|
+
</div>
|
99
|
+
</div>
|
100
|
+
|
101
|
+
</div>
|
102
|
+
|
103
|
+
|
104
|
+
<!-- if includes -->
|
105
|
+
<div id="includes">
|
106
|
+
<h3 class="section-bar">Included Modules</h3>
|
107
|
+
|
108
|
+
<div id="includes-list">
|
109
|
+
<span class="include-name"><a href="../ApplyOnlyForMobile.html">ApplyOnlyForMobile</a></span>
|
110
|
+
</div>
|
111
|
+
</div>
|
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-M000070" class="method-detail">
|
127
|
+
<a name="M000070"></a>
|
128
|
+
|
129
|
+
<div class="method-heading">
|
130
|
+
<a href="#M000070" class="method-signature">
|
131
|
+
<span class="method-name">to_external</span><span class="method-args">(str, controller)</span>
|
132
|
+
</a>
|
133
|
+
</div>
|
134
|
+
|
135
|
+
<div class="method-description">
|
136
|
+
<p><a class="source-toggle" href="#"
|
137
|
+
onclick="toggleCode('M000070-source');return false;">[Source]</a></p>
|
138
|
+
<div class="method-source-code" id="M000070-source">
|
139
|
+
<pre>
|
140
|
+
<span class="ruby-comment cmt"># File lib/jpmobile/filter.rb, line 181</span>
|
141
|
+
181: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_external</span>(<span class="ruby-identifier">str</span>, <span class="ruby-identifier">controller</span>)
|
142
|
+
182: <span class="ruby-constant">Jpmobile</span><span class="ruby-operator">::</span><span class="ruby-constant">Emoticon</span><span class="ruby-operator">::</span><span class="ruby-identifier">utf8_to_unicodecr</span>(<span class="ruby-identifier">str</span>)
|
143
|
+
183: <span class="ruby-keyword kw">end</span>
|
144
|
+
</pre>
|
145
|
+
</div>
|
146
|
+
</div>
|
147
|
+
</div>
|
148
|
+
|
149
|
+
<div id="method-M000069" class="method-detail">
|
150
|
+
<a name="M000069"></a>
|
151
|
+
|
152
|
+
<div class="method-heading">
|
153
|
+
<a href="#M000069" class="method-signature">
|
154
|
+
<span class="method-name">to_internal</span><span class="method-args">(str, controller)</span>
|
155
|
+
</a>
|
156
|
+
</div>
|
157
|
+
|
158
|
+
<div class="method-description">
|
159
|
+
<p><a class="source-toggle" href="#"
|
160
|
+
onclick="toggleCode('M000069-source');return false;">[Source]</a></p>
|
161
|
+
<div class="method-source-code" id="M000069-source">
|
162
|
+
<pre>
|
163
|
+
<span class="ruby-comment cmt"># File lib/jpmobile/filter.rb, line 178</span>
|
164
|
+
178: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_internal</span>(<span class="ruby-identifier">str</span>, <span class="ruby-identifier">controller</span>)
|
165
|
+
179: <span class="ruby-constant">Jpmobile</span><span class="ruby-operator">::</span><span class="ruby-constant">Emoticon</span><span class="ruby-operator">::</span><span class="ruby-identifier">unicodecr_to_utf8</span>(<span class="ruby-identifier">str</span>)
|
166
|
+
180: <span class="ruby-keyword kw">end</span>
|
167
|
+
</pre>
|
168
|
+
</div>
|
169
|
+
</div>
|
170
|
+
</div>
|
171
|
+
|
172
|
+
|
173
|
+
</div>
|
174
|
+
|
175
|
+
|
176
|
+
</div>
|
177
|
+
|
178
|
+
|
179
|
+
<div id="validator-badges">
|
180
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
181
|
+
</div>
|
182
|
+
|
183
|
+
</body>
|
184
|
+
</html>
|
@@ -0,0 +1,207 @@
|
|
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::Filter::Emoticon::Outer</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::Filter::Emoticon::Outer</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../../../../files/lib/jpmobile/filter_rb.html">
|
59
|
+
lib/jpmobile/filter.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
|
+
Base
|
69
|
+
</td>
|
70
|
+
</tr>
|
71
|
+
</table>
|
72
|
+
</div>
|
73
|
+
<!-- banner header -->
|
74
|
+
|
75
|
+
<div id="bodyContent">
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
<div id="contextContent">
|
80
|
+
|
81
|
+
<div id="description">
|
82
|
+
<p>
|
83
|
+
絵文字<a href="Outer.html">Outer</a>
|
84
|
+
外部エンコーディング(携帯電話側)とUnicode数値文字参照を相互に変換。
|
85
|
+
</p>
|
86
|
+
|
87
|
+
</div>
|
88
|
+
|
89
|
+
|
90
|
+
</div>
|
91
|
+
|
92
|
+
<div id="method-list">
|
93
|
+
<h3 class="section-bar">Methods</h3>
|
94
|
+
|
95
|
+
<div class="name-list">
|
96
|
+
<a href="#M000072">to_external</a>
|
97
|
+
<a href="#M000071">to_internal</a>
|
98
|
+
</div>
|
99
|
+
</div>
|
100
|
+
|
101
|
+
</div>
|
102
|
+
|
103
|
+
|
104
|
+
<!-- if includes -->
|
105
|
+
<div id="includes">
|
106
|
+
<h3 class="section-bar">Included Modules</h3>
|
107
|
+
|
108
|
+
<div id="includes-list">
|
109
|
+
<span class="include-name"><a href="../ApplyOnlyForMobile.html">ApplyOnlyForMobile</a></span>
|
110
|
+
</div>
|
111
|
+
</div>
|
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-M000072" class="method-detail">
|
127
|
+
<a name="M000072"></a>
|
128
|
+
|
129
|
+
<div class="method-heading">
|
130
|
+
<a href="#M000072" class="method-signature">
|
131
|
+
<span class="method-name">to_external</span><span class="method-args">(str, controller)</span>
|
132
|
+
</a>
|
133
|
+
</div>
|
134
|
+
|
135
|
+
<div class="method-description">
|
136
|
+
<p><a class="source-toggle" href="#"
|
137
|
+
onclick="toggleCode('M000072-source');return false;">[Source]</a></p>
|
138
|
+
<div class="method-source-code" id="M000072-source">
|
139
|
+
<pre>
|
140
|
+
<span class="ruby-comment cmt"># File lib/jpmobile/filter.rb, line 153</span>
|
141
|
+
153: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_external</span>(<span class="ruby-identifier">str</span>, <span class="ruby-identifier">controller</span>)
|
142
|
+
154: <span class="ruby-comment cmt"># 使用する変換テーブルの決定</span>
|
143
|
+
155: <span class="ruby-identifier">table</span> = <span class="ruby-keyword kw">nil</span>
|
144
|
+
156: <span class="ruby-identifier">to_sjis</span> = <span class="ruby-keyword kw">false</span>
|
145
|
+
157: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">controller</span>.<span class="ruby-identifier">request</span>.<span class="ruby-identifier">mobile</span>
|
146
|
+
158: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">Jpmobile</span><span class="ruby-operator">::</span><span class="ruby-constant">Mobile</span><span class="ruby-operator">::</span><span class="ruby-constant">Docomo</span>
|
147
|
+
159: <span class="ruby-identifier">table</span> = <span class="ruby-constant">Jpmobile</span><span class="ruby-operator">::</span><span class="ruby-constant">Emoticon</span><span class="ruby-operator">::</span><span class="ruby-constant">CONVERSION_TABLE_TO_DOCOMO</span>
|
148
|
+
160: <span class="ruby-identifier">to_sjis</span> = <span class="ruby-keyword kw">true</span>
|
149
|
+
161: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">Jpmobile</span><span class="ruby-operator">::</span><span class="ruby-constant">Mobile</span><span class="ruby-operator">::</span><span class="ruby-constant">Au</span>
|
150
|
+
162: <span class="ruby-identifier">table</span> = <span class="ruby-constant">Jpmobile</span><span class="ruby-operator">::</span><span class="ruby-constant">Emoticon</span><span class="ruby-operator">::</span><span class="ruby-constant">CONVERSION_TABLE_TO_AU</span>
|
151
|
+
163: <span class="ruby-identifier">to_sjis</span> = <span class="ruby-keyword kw">true</span>
|
152
|
+
164: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">Jpmobile</span><span class="ruby-operator">::</span><span class="ruby-constant">Mobile</span><span class="ruby-operator">::</span><span class="ruby-constant">Jphone</span>
|
153
|
+
165: <span class="ruby-identifier">table</span> = <span class="ruby-constant">Jpmobile</span><span class="ruby-operator">::</span><span class="ruby-constant">Emoticon</span><span class="ruby-operator">::</span><span class="ruby-constant">CONVERSION_TABLE_TO_SOFTBANK</span>
|
154
|
+
166: <span class="ruby-identifier">to_sjis</span> = <span class="ruby-keyword kw">true</span>
|
155
|
+
167: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">Jpmobile</span><span class="ruby-operator">::</span><span class="ruby-constant">Mobile</span><span class="ruby-operator">::</span><span class="ruby-constant">Softbank</span>
|
156
|
+
168: <span class="ruby-identifier">table</span> = <span class="ruby-constant">Jpmobile</span><span class="ruby-operator">::</span><span class="ruby-constant">Emoticon</span><span class="ruby-operator">::</span><span class="ruby-constant">CONVERSION_TABLE_TO_SOFTBANK</span>
|
157
|
+
169: <span class="ruby-keyword kw">end</span>
|
158
|
+
170:
|
159
|
+
171: <span class="ruby-constant">Jpmobile</span><span class="ruby-operator">::</span><span class="ruby-constant">Emoticon</span><span class="ruby-operator">::</span><span class="ruby-identifier">unicodecr_to_external</span>(<span class="ruby-identifier">str</span>, <span class="ruby-identifier">table</span>, <span class="ruby-identifier">to_sjis</span>)
|
160
|
+
172: <span class="ruby-keyword kw">end</span>
|
161
|
+
</pre>
|
162
|
+
</div>
|
163
|
+
</div>
|
164
|
+
</div>
|
165
|
+
|
166
|
+
<div id="method-M000071" class="method-detail">
|
167
|
+
<a name="M000071"></a>
|
168
|
+
|
169
|
+
<div class="method-heading">
|
170
|
+
<a href="#M000071" class="method-signature">
|
171
|
+
<span class="method-name">to_internal</span><span class="method-args">(str, controller)</span>
|
172
|
+
</a>
|
173
|
+
</div>
|
174
|
+
|
175
|
+
<div class="method-description">
|
176
|
+
<p><a class="source-toggle" href="#"
|
177
|
+
onclick="toggleCode('M000071-source');return false;">[Source]</a></p>
|
178
|
+
<div class="method-source-code" id="M000071-source">
|
179
|
+
<pre>
|
180
|
+
<span class="ruby-comment cmt"># File lib/jpmobile/filter.rb, line 144</span>
|
181
|
+
144: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_internal</span>(<span class="ruby-identifier">str</span>, <span class="ruby-identifier">controller</span>)
|
182
|
+
145: <span class="ruby-identifier">method_name</span> = <span class="ruby-value str">"external_to_unicodecr_"</span> <span class="ruby-operator">+</span>
|
183
|
+
146: <span class="ruby-identifier">controller</span>.<span class="ruby-identifier">request</span>.<span class="ruby-identifier">mobile</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">name</span>[<span class="ruby-regexp re">/::(\w*)$/</span>, <span class="ruby-value">1</span>].<span class="ruby-identifier">downcase</span>
|
184
|
+
147: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">Jpmobile</span><span class="ruby-operator">::</span><span class="ruby-constant">Emoticon</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-identifier">method_name</span>)
|
185
|
+
148: <span class="ruby-constant">Jpmobile</span><span class="ruby-operator">::</span><span class="ruby-constant">Emoticon</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">method_name</span>, <span class="ruby-identifier">str</span>)
|
186
|
+
149: <span class="ruby-keyword kw">else</span>
|
187
|
+
150: <span class="ruby-identifier">str</span> <span class="ruby-comment cmt"># 対応する変換メソッドが定義されていない場合は素通し</span>
|
188
|
+
151: <span class="ruby-keyword kw">end</span>
|
189
|
+
152: <span class="ruby-keyword kw">end</span>
|
190
|
+
</pre>
|
191
|
+
</div>
|
192
|
+
</div>
|
193
|
+
</div>
|
194
|
+
|
195
|
+
|
196
|
+
</div>
|
197
|
+
|
198
|
+
|
199
|
+
</div>
|
200
|
+
|
201
|
+
|
202
|
+
<div id="validator-badges">
|
203
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
204
|
+
</div>
|
205
|
+
|
206
|
+
</body>
|
207
|
+
</html>
|