jpmobile 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (96) hide show
  1. data/README +41 -4
  2. data/Rakefile +11 -9
  3. data/lib/jpmobile.rb +0 -6
  4. data/lib/jpmobile/emoticon.rb +105 -0
  5. data/lib/jpmobile/emoticon/au.rb +644 -0
  6. data/lib/jpmobile/emoticon/conversion_table.rb +3908 -0
  7. data/lib/jpmobile/emoticon/docomo.rb +255 -0
  8. data/lib/jpmobile/emoticon/softbank.rb +477 -0
  9. data/lib/jpmobile/emoticon/z_combine.rb +20 -0
  10. data/lib/jpmobile/filter.rb +73 -51
  11. data/lib/jpmobile/helpers.rb +4 -4
  12. data/lib/jpmobile/hook_abstract_request.rb +6 -2
  13. data/lib/jpmobile/hook_action_controller.rb +10 -0
  14. data/lib/jpmobile/hook_action_view.rb +7 -0
  15. data/lib/jpmobile/mobile/abstract_mobile.rb +5 -1
  16. data/lib/jpmobile/mobile/au.rb +1 -1
  17. data/lib/jpmobile/mobile/docomo.rb +2 -5
  18. data/lib/jpmobile/mobile/softbank.rb +9 -1
  19. data/lib/jpmobile/mobile/z_display_info_docomo.rb +32 -10
  20. data/lib/jpmobile/mobile/z_ip_addresses.rb +6 -6
  21. data/lib/jpmobile/mobile/z_ip_addresses_au.rb +2 -1
  22. data/lib/jpmobile/mobile/z_ip_addresses_willcom.rb +6 -1
  23. data/lib/jpmobile/trans_sid.rb +5 -2
  24. data/lib/jpmobile/version.rb +1 -1
  25. data/test/au_test.rb +1 -0
  26. data/test/docomo_test.rb +8 -0
  27. data/test/emoticon_functional_test.rb +166 -0
  28. data/test/emoticon_test.rb +58 -0
  29. data/test/filter_functional_test.rb +146 -0
  30. data/test/filter_test.rb +8 -8
  31. data/test/softbank_test.rb +18 -0
  32. data/tools/generate_au_emoticon_table.rb +25 -0
  33. data/tools/{update_emoji_docomo.rb → generate_docomo_emoticon_table.rb} +4 -8
  34. data/tools/generate_emoticon_conversion_table.rb +107 -0
  35. data/tools/generate_softbank_emoticon_table.rb +32 -0
  36. data/tools/update_display_info_docomo.rb +3 -5
  37. metadata +18 -75
  38. data/NOTES +0 -21
  39. data/TODO +0 -16
  40. data/doc/classes/ActionController.html +0 -107
  41. data/doc/classes/ActionController/AbstractRequest.html +0 -216
  42. data/doc/classes/ActionView.html +0 -101
  43. data/doc/classes/DatumConv.html +0 -324
  44. data/doc/classes/Jpmobile/Display.html +0 -333
  45. data/doc/classes/Jpmobile/Filter.html +0 -119
  46. data/doc/classes/Jpmobile/Filter/Base.html +0 -269
  47. data/doc/classes/Jpmobile/Filter/Emoji.html +0 -130
  48. data/doc/classes/Jpmobile/Filter/Emoji/Inner.html +0 -183
  49. data/doc/classes/Jpmobile/Filter/Emoji/Outer.html +0 -187
  50. data/doc/classes/Jpmobile/Filter/FilterTable.html +0 -178
  51. data/doc/classes/Jpmobile/Filter/HankakuKana.html +0 -170
  52. data/doc/classes/Jpmobile/Filter/Sjis.html +0 -244
  53. data/doc/classes/Jpmobile/Helpers.html +0 -558
  54. data/doc/classes/Jpmobile/Mobile.html +0 -141
  55. data/doc/classes/Jpmobile/Mobile/AbstractMobile.html +0 -324
  56. data/doc/classes/Jpmobile/Mobile/Au.html +0 -415
  57. data/doc/classes/Jpmobile/Mobile/Ddipocket.html +0 -138
  58. data/doc/classes/Jpmobile/Mobile/Docomo.html +0 -366
  59. data/doc/classes/Jpmobile/Mobile/Jphone.html +0 -212
  60. data/doc/classes/Jpmobile/Mobile/Softbank.html +0 -300
  61. data/doc/classes/Jpmobile/Mobile/Vodafone.html +0 -176
  62. data/doc/classes/Jpmobile/Mobile/Willcom.html +0 -210
  63. data/doc/classes/Jpmobile/Position.html +0 -384
  64. data/doc/created.rid +0 -1
  65. data/doc/files/CHANGELOG.html +0 -110
  66. data/doc/files/NOTES.html +0 -163
  67. data/doc/files/README.html +0 -345
  68. data/doc/files/TODO.html +0 -138
  69. data/doc/files/lib/jpmobile/datum_conv_rb.html +0 -110
  70. data/doc/files/lib/jpmobile/filter_rb.html +0 -115
  71. data/doc/files/lib/jpmobile/helpers_rb.html +0 -105
  72. data/doc/files/lib/jpmobile/hook_abstract_request_rb.html +0 -109
  73. data/doc/files/lib/jpmobile/hook_action_view_rb.html +0 -119
  74. data/doc/files/lib/jpmobile/mobile/abstract_mobile_rb.html +0 -108
  75. data/doc/files/lib/jpmobile/mobile/au_rb.html +0 -112
  76. data/doc/files/lib/jpmobile/mobile/display_rb.html +0 -111
  77. data/doc/files/lib/jpmobile/mobile/docomo_rb.html +0 -105
  78. data/doc/files/lib/jpmobile/mobile/softbank_rb.html +0 -115
  79. data/doc/files/lib/jpmobile/mobile/willcom_rb.html +0 -108
  80. data/doc/files/lib/jpmobile/mobile/z_display_info_docomo_rb.html +0 -114
  81. data/doc/files/lib/jpmobile/mobile/z_emoji_docomo_rb.html +0 -119
  82. data/doc/files/lib/jpmobile/mobile/z_ip_addresses_au_rb.html +0 -114
  83. data/doc/files/lib/jpmobile/mobile/z_ip_addresses_rb.html +0 -117
  84. data/doc/files/lib/jpmobile/mobile/z_ip_addresses_willcom_rb.html +0 -114
  85. data/doc/files/lib/jpmobile/position_rb.html +0 -105
  86. data/doc/files/lib/jpmobile/trans_sid_rb.html +0 -114
  87. data/doc/files/lib/jpmobile/version_rb.html +0 -101
  88. data/doc/files/lib/jpmobile_rb.html +0 -101
  89. data/doc/fr_class_index.html +0 -50
  90. data/doc/fr_file_index.html +0 -50
  91. data/doc/fr_method_index.html +0 -113
  92. data/doc/index.html +0 -24
  93. data/doc/rdoc-style.css +0 -208
  94. data/lib/jpmobile/mobile/z_emoji_docomo.rb +0 -508
  95. data/test/firefox_test.rb +0 -8
  96. data/test/transitsid_test.rb +0 -86
@@ -1,269 +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::Filter::Base</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::Base</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
- Object
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
- 文字コードフィルタのベースクラス。
84
- </p>
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="#M000062">after</a>&nbsp;&nbsp;
96
- <a href="#M000063">apply_incoming?</a>&nbsp;&nbsp;
97
- <a href="#M000064">apply_outgoing?</a>&nbsp;&nbsp;
98
- <a href="#M000061">before</a>&nbsp;&nbsp;
99
- <a href="#M000060">new</a>&nbsp;&nbsp;
100
- </div>
101
- </div>
102
-
103
- </div>
104
-
105
-
106
- <!-- if includes -->
107
-
108
- <div id="section">
109
-
110
-
111
-
112
-
113
-
114
-
115
-
116
-
117
- <!-- if method_list -->
118
- <div id="methods">
119
- <h3 class="section-bar">Public Class methods</h3>
120
-
121
- <div id="method-M000060" class="method-detail">
122
- <a name="M000060"></a>
123
-
124
- <div class="method-heading">
125
- <a href="#M000060" class="method-signature">
126
- <span class="method-name">new</span><span class="method-args">()</span>
127
- </a>
128
- </div>
129
-
130
- <div class="method-description">
131
- <p><a class="source-toggle" href="#"
132
- onclick="toggleCode('M000060-source');return false;">[Source]</a></p>
133
- <div class="method-source-code" id="M000060-source">
134
- <pre>
135
- <span class="ruby-comment cmt"># File lib/jpmobile/filter.rb, line 20</span>
136
- 20: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>
137
- 21: <span class="ruby-ivar">@counter</span> = <span class="ruby-value">0</span> <span class="ruby-comment cmt"># render :component 時に多重で適用されるのを防ぐ</span>
138
- 22: <span class="ruby-keyword kw">end</span>
139
- </pre>
140
- </div>
141
- </div>
142
- </div>
143
-
144
- <h3 class="section-bar">Public Instance methods</h3>
145
-
146
- <div id="method-M000062" class="method-detail">
147
- <a name="M000062"></a>
148
-
149
- <div class="method-heading">
150
- <a href="#M000062" class="method-signature">
151
- <span class="method-name">after</span><span class="method-args">(controller)</span>
152
- </a>
153
- </div>
154
-
155
- <div class="method-description">
156
- <p>
157
- 内部コードから外部コードに変換
158
- </p>
159
- <p><a class="source-toggle" href="#"
160
- onclick="toggleCode('M000062-source');return false;">[Source]</a></p>
161
- <div class="method-source-code" id="M000062-source">
162
- <pre>
163
- <span class="ruby-comment cmt"># File lib/jpmobile/filter.rb, line 34</span>
164
- 34: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">after</span>(<span class="ruby-identifier">controller</span>)
165
- 35: <span class="ruby-ivar">@counter</span> <span class="ruby-operator">-=</span> <span class="ruby-value">1</span>
166
- 36: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@counter</span>.<span class="ruby-identifier">zero?</span>
167
- 37: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">respond_to?</span>(<span class="ruby-identifier">:to_external</span>) <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">apply_outgoing?</span>(<span class="ruby-identifier">controller</span>)
168
- 38: <span class="ruby-identifier">controller</span>.<span class="ruby-identifier">response</span>.<span class="ruby-identifier">body</span> = <span class="ruby-identifier">to_external</span>(<span class="ruby-identifier">controller</span>.<span class="ruby-identifier">response</span>.<span class="ruby-identifier">body</span>)
169
- 39: <span class="ruby-identifier">after_after</span>(<span class="ruby-identifier">controller</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">respond_to?</span> <span class="ruby-identifier">:after_after</span>
170
- 40: <span class="ruby-keyword kw">end</span>
171
- 41: <span class="ruby-keyword kw">end</span>
172
- </pre>
173
- </div>
174
- </div>
175
- </div>
176
-
177
- <div id="method-M000063" class="method-detail">
178
- <a name="M000063"></a>
179
-
180
- <div class="method-heading">
181
- <a href="#M000063" class="method-signature">
182
- <span class="method-name">apply_incoming?</span><span class="method-args">(controller)</span>
183
- </a>
184
- </div>
185
-
186
- <div class="method-description">
187
- <p>
188
- 入力時(params)にこのフィルタを適用するか
189
- </p>
190
- <p><a class="source-toggle" href="#"
191
- onclick="toggleCode('M000063-source');return false;">[Source]</a></p>
192
- <div class="method-source-code" id="M000063-source">
193
- <pre>
194
- <span class="ruby-comment cmt"># File lib/jpmobile/filter.rb, line 43</span>
195
- 43: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">apply_incoming?</span>(<span class="ruby-identifier">controller</span>); <span class="ruby-keyword kw">true</span>; <span class="ruby-keyword kw">end</span>
196
- </pre>
197
- </div>
198
- </div>
199
- </div>
200
-
201
- <div id="method-M000064" class="method-detail">
202
- <a name="M000064"></a>
203
-
204
- <div class="method-heading">
205
- <a href="#M000064" class="method-signature">
206
- <span class="method-name">apply_outgoing?</span><span class="method-args">(controller)</span>
207
- </a>
208
- </div>
209
-
210
- <div class="method-description">
211
- <p>
212
- 出力時(response.body)にこのフィルタを適用するべきか
213
- </p>
214
- <p><a class="source-toggle" href="#"
215
- onclick="toggleCode('M000064-source');return false;">[Source]</a></p>
216
- <div class="method-source-code" id="M000064-source">
217
- <pre>
218
- <span class="ruby-comment cmt"># File lib/jpmobile/filter.rb, line 45</span>
219
- 45: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">apply_outgoing?</span>(<span class="ruby-identifier">controller</span>); <span class="ruby-keyword kw">true</span>; <span class="ruby-keyword kw">end</span>
220
- </pre>
221
- </div>
222
- </div>
223
- </div>
224
-
225
- <div id="method-M000061" class="method-detail">
226
- <a name="M000061"></a>
227
-
228
- <div class="method-heading">
229
- <a href="#M000061" class="method-signature">
230
- <span class="method-name">before</span><span class="method-args">(controller)</span>
231
- </a>
232
- </div>
233
-
234
- <div class="method-description">
235
- <p>
236
- 外部コードから内部コードに変換
237
- </p>
238
- <p><a class="source-toggle" href="#"
239
- onclick="toggleCode('M000061-source');return false;">[Source]</a></p>
240
- <div class="method-source-code" id="M000061-source">
241
- <pre>
242
- <span class="ruby-comment cmt"># File lib/jpmobile/filter.rb, line 24</span>
243
- 24: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">before</span>(<span class="ruby-identifier">controller</span>)
244
- 25: <span class="ruby-ivar">@counter</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
245
- 26: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@counter</span> <span class="ruby-operator">==</span> <span class="ruby-value">1</span>
246
- 27: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">respond_to?</span>(<span class="ruby-identifier">:to_internal</span>) <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">apply_incoming?</span>(<span class="ruby-identifier">controller</span>)
247
- 28: <span class="ruby-identifier">deep_each</span>(<span class="ruby-identifier">controller</span>.<span class="ruby-identifier">params</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">value</span><span class="ruby-operator">|</span>
248
- 29: <span class="ruby-identifier">value</span> = <span class="ruby-identifier">to_internal</span>(<span class="ruby-identifier">value</span>)
249
- 30: <span class="ruby-keyword kw">end</span>
250
- 31: <span class="ruby-keyword kw">end</span>
251
- 32: <span class="ruby-keyword kw">end</span>
252
- </pre>
253
- </div>
254
- </div>
255
- </div>
256
-
257
-
258
- </div>
259
-
260
-
261
- </div>
262
-
263
-
264
- <div id="validator-badges">
265
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
266
- </div>
267
-
268
- </body>
269
- </html>
@@ -1,130 +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::Filter::Emoji</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::Emoji</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
-
76
-
77
- </div>
78
-
79
-
80
- </div>
81
-
82
-
83
- <!-- if includes -->
84
-
85
- <div id="section">
86
-
87
- <div id="class-list">
88
- <h3 class="section-bar">Classes and Modules</h3>
89
-
90
- Class <a href="Emoji/Inner.html" class="link">Jpmobile::Filter::Emoji::Inner</a><br />
91
- Class <a href="Emoji/Outer.html" class="link">Jpmobile::Filter::Emoji::Outer</a><br />
92
-
93
- </div>
94
-
95
- <div id="constants-list">
96
- <h3 class="section-bar">Constants</h3>
97
-
98
- <div class="name-list">
99
- <table summary="Constants">
100
- <tr class="top-aligned-row context-row">
101
- <td class="context-item-name">DOCOMO_EMOJI_SJIS_REGEXP</td>
102
- <td>=</td>
103
- <td class="context-item-value">/\xf8[\x9f-\xfc]| \xf9[\x40-\x49\x50-\x52\x55-\x57\x5b-\x5e\x72-\x7e\x80-\xfc]/x.freeze</td>
104
- </tr>
105
- <tr class="top-aligned-row context-row">
106
- <td class="context-item-name">DOCOMO_EMOJI_UTF8_REGEXP</td>
107
- <td>=</td>
108
- <td class="context-item-value">/\xee(?:\x98[\xbe-\xbf]| \x99[\x80-\xbf]| \x9a[\x80-\xa5\xac-\xae\xb1-\xb3\xb7-\xba]| \x9b[\x8e-\xbf]| \x9c[\x80-\xbf]| \x9d[\x80-\x97])/x.freeze</td>
109
- </tr>
110
- </table>
111
- </div>
112
- </div>
113
-
114
-
115
-
116
-
117
-
118
-
119
- <!-- if method_list -->
120
-
121
-
122
- </div>
123
-
124
-
125
- <div id="validator-badges">
126
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
127
- </div>
128
-
129
- </body>
130
- </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::Filter::Emoji::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::Emoji::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
- </p>
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="#M000050">to_external</a>&nbsp;&nbsp;
96
- <a href="#M000049">to_internal</a>&nbsp;&nbsp;
97
- </div>
98
- </div>
99
-
100
- </div>
101
-
102
-
103
- <!-- if includes -->
104
-
105
- <div id="section">
106
-
107
-
108
-
109
-
110
-
111
-
112
-
113
-
114
- <!-- if method_list -->
115
- <div id="methods">
116
- <h3 class="section-bar">Public Instance methods</h3>
117
-
118
- <div id="method-M000050" class="method-detail">
119
- <a name="M000050"></a>
120
-
121
- <div class="method-heading">
122
- <a href="#M000050" class="method-signature">
123
- <span class="method-name">to_external</span><span class="method-args">(str)</span>
124
- </a>
125
- </div>
126
-
127
- <div class="method-description">
128
- <p><a class="source-toggle" href="#"
129
- onclick="toggleCode('M000050-source');return false;">[Source]</a></p>
130
- <div class="method-source-code" id="M000050-source">
131
- <pre>
132
- <span class="ruby-comment cmt"># File lib/jpmobile/filter.rb, line 152</span>
133
- 152: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_external</span>(<span class="ruby-identifier">str</span>)
134
- 153: <span class="ruby-comment cmt"># DoCoMo UTF-8絵文字バイナリ を DoCoMo Unicode絵文字実体参照 に置換</span>
135
- 154: <span class="ruby-identifier">str</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-constant">DOCOMO_EMOJI_UTF8_REGEXP</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">match</span><span class="ruby-operator">|</span>
136
- 155: <span class="ruby-value str">&quot;&amp;#x%04x;&quot;</span> <span class="ruby-operator">%</span> <span class="ruby-identifier">match</span>.<span class="ruby-identifier">unpack</span>(<span class="ruby-value str">'U'</span>).<span class="ruby-identifier">first</span>
137
- 156: <span class="ruby-keyword kw">end</span>
138
- 157: <span class="ruby-keyword kw">end</span>
139
- </pre>
140
- </div>
141
- </div>
142
- </div>
143
-
144
- <div id="method-M000049" class="method-detail">
145
- <a name="M000049"></a>
146
-
147
- <div class="method-heading">
148
- <a href="#M000049" class="method-signature">
149
- <span class="method-name">to_internal</span><span class="method-args">(str)</span>
150
- </a>
151
- </div>
152
-
153
- <div class="method-description">
154
- <p><a class="source-toggle" href="#"
155
- onclick="toggleCode('M000049-source');return false;">[Source]</a></p>
156
- <div class="method-source-code" id="M000049-source">
157
- <pre>
158
- <span class="ruby-comment cmt"># File lib/jpmobile/filter.rb, line 145</span>
159
- 145: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_internal</span>(<span class="ruby-identifier">str</span>)
160
- 146: <span class="ruby-comment cmt"># DoCoMo Unicode絵文字実体参照 を DoCoMo UTF-8絵文字バイナリ に置換</span>
161
- 147: <span class="ruby-identifier">str</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-regexp re">/&amp;#x([0-9a-fA-F]{4});/</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">match</span><span class="ruby-operator">|</span>
162
- 148: <span class="ruby-identifier">unicode</span> = <span class="ruby-identifier">$1</span>.<span class="ruby-identifier">scanf</span>(<span class="ruby-value str">&quot;%x&quot;</span>).<span class="ruby-identifier">first</span>
163
- 149: <span class="ruby-constant">DOCOMO_UNICODE_TO_SJIS</span>[<span class="ruby-identifier">unicode</span>] <span class="ruby-operator">?</span> [<span class="ruby-identifier">unicode</span>].<span class="ruby-identifier">pack</span>(<span class="ruby-value str">'U'</span>) <span class="ruby-operator">:</span> <span class="ruby-identifier">match</span>
164
- 150: <span class="ruby-keyword kw">end</span>
165
- 151: <span class="ruby-keyword kw">end</span>
166
- </pre>
167
- </div>
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>