magpie 0.8.6.1 → 0.8.6.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,255 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta name="Content-Type" content="text/html; charset=utf-8" />
6
+ <title>Module: Magpie</title>
7
+ <link rel="stylesheet" href="css/style.css" type="text/css" media="screen" charset="utf-8" />
8
+ <link rel="stylesheet" href="css/common.css" type="text/css" media="screen" charset="utf-8" />
9
+
10
+ <script type="text/javascript" charset="utf-8">
11
+ relpath = '';
12
+ if (relpath != '') relpath += '/';
13
+ </script>
14
+ <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
15
+ <script type="text/javascript" charset="utf-8" src="js/app.js"></script>
16
+
17
+ </head>
18
+ <body>
19
+ <script type="text/javascript" charset="utf-8">
20
+ if (window.top.frames.main) document.body.className = 'frames';
21
+ </script>
22
+
23
+ <div id="header">
24
+ <div id="menu">
25
+
26
+ <a href="_index.html">Index (M)</a> &raquo;
27
+
28
+
29
+ <span class="title">Magpie</span>
30
+
31
+
32
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
33
+ </div>
34
+
35
+ <div id="search">
36
+ <a id="class_list_link" href="#">Class List</a>
37
+ <a id="method_list_link" href="#">Method List</a>
38
+ <a id ="file_list_link" href="#">File List</a>
39
+ </div>
40
+
41
+ <div class="clear"></div>
42
+ </div>
43
+
44
+ <iframe id="search_frame"></iframe>
45
+
46
+ <div id="content"><h1>Module: Magpie
47
+
48
+
49
+
50
+ </h1>
51
+
52
+ <dl class="box">
53
+
54
+
55
+
56
+
57
+
58
+
59
+
60
+
61
+ <dt class="r1 last">Defined in:</dt>
62
+ <dd class="r1 last">lib/magpie.rb<span class="defines">,<br />
63
+ lib/magpie/utils.rb,<br /> lib/magpie/server.rb,<br /> lib/middles/alipay.rb,<br /> lib/middles/mothlog.rb,<br /> lib/middles/chinabank.rb</span>
64
+ </dd>
65
+
66
+ </dl>
67
+ <div class="clear"></div>
68
+
69
+ <h2>Defined Under Namespace</h2>
70
+ <p class="children">
71
+
72
+
73
+ <strong class="modules">Modules:</strong> <span class='object_link'><a href="Magpie/Utils.html" title="Magpie::Utils (module)">Utils</a></span>
74
+
75
+
76
+
77
+ <strong class="classes">Classes:</strong> <span class='object_link'><a href="Magpie/Alipay.html" title="Magpie::Alipay (class)">Alipay</a></span>, <span class='object_link'><a href="Magpie/Chinabank.html" title="Magpie::Chinabank (class)">Chinabank</a></span>, <span class='object_link'><a href="Magpie/Mothlog.html" title="Magpie::Mothlog (class)">Mothlog</a></span>, <span class='object_link'><a href="Magpie/Server.html" title="Magpie::Server (class)">Server</a></span>
78
+
79
+
80
+ </p>
81
+
82
+ <h2>Constant Summary</h2>
83
+
84
+ <dl class="constants">
85
+
86
+ <dt id="VERSION-constant" class="">VERSION =
87
+
88
+ </dt>
89
+ <dd><pre class="code"><span class='lbrack token'>[</span><span class='integer val'>0</span><span class='comma token'>,</span> <span class='integer val'>8</span><span class='comma token'>,</span> <span class='integer val'>6</span><span class='rbrack token'>]</span>
90
+ </pre></dd>
91
+
92
+ <dt id="APP-constant" class="">APP =
93
+
94
+ </dt>
95
+ <dd><pre class="code"><span class='Rack constant id'>Rack</span><span class='colon2 op'>::</span><span class='Builder constant id'>Builder</span><span class='dot token'>.</span><span class='new identifier id'>new</span> <span class='lbrace token'>{</span>
96
+ </pre></dd>
97
+
98
+ </dl>
99
+
100
+
101
+
102
+ <h2>Class Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
103
+ <ul class="summary">
104
+
105
+ <li class="public ">
106
+ <span class="summary_signature">
107
+
108
+ <a href="#yml_db-class_method" title="yml_db (class method)">+ (Object) <strong>yml_db</strong> </a>
109
+
110
+
111
+
112
+ </span>
113
+
114
+
115
+
116
+
117
+
118
+
119
+
120
+
121
+
122
+
123
+
124
+ <span class="summary_desc"><div class='inline'><p>Returns the value of attribute yml_db.</p></div></span>
125
+
126
+ </li>
127
+
128
+
129
+ </ul>
130
+
131
+
132
+
133
+ <h2>
134
+ Class Method Summary
135
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
136
+ </h2>
137
+
138
+ <ul class="summary">
139
+
140
+ <li class="public ">
141
+ <span class="summary_signature">
142
+
143
+ <a href="#version-class_method" title="version (class method)">+ (Object) <strong>version</strong> </a>
144
+
145
+
146
+
147
+ </span>
148
+
149
+
150
+
151
+
152
+
153
+
154
+
155
+
156
+ <span class="summary_desc"><div class='inline'></div></span>
157
+
158
+ </li>
159
+
160
+
161
+ </ul>
162
+
163
+
164
+
165
+ <div id="class_attr_details" class="attr_details">
166
+ <h2>Class Attribute Details</h2>
167
+
168
+
169
+ <span id="yml_db=-class_method"></span>
170
+ <span id="yml_db-class_method"></span>
171
+ <div class="method_details first">
172
+ <p class="signature first" id="yml_db-class_method">
173
+
174
+ + (<tt>Object</tt>) <strong>yml_db</strong>
175
+
176
+
177
+
178
+ </p><div class="docstring">
179
+ <div class="discussion">
180
+ <p>Returns the value of attribute yml_db</p>
181
+
182
+ </div>
183
+ </div>
184
+ <div class="tags">
185
+
186
+ </div><table class="source_code">
187
+ <tr>
188
+ <td>
189
+ <pre class="lines">
190
+
191
+
192
+ 13
193
+ 14
194
+ 15</pre>
195
+ </td>
196
+ <td>
197
+ <pre class="code"><span class="info file"># File 'lib/magpie.rb', line 13</span>
198
+
199
+ <span class='def def kw'>def</span> <span class='yml_db identifier id'>yml_db</span>
200
+ <span class='@yml_db ivar id'>@yml_db</span>
201
+ <span class='end end kw'>end</span>
202
+ </pre>
203
+ </td>
204
+ </tr>
205
+ </table>
206
+ </div>
207
+
208
+ </div>
209
+
210
+
211
+ <div id="class_method_details" class="method_details_list">
212
+ <h2>Class Method Details</h2>
213
+
214
+
215
+ <div class="method_details first">
216
+ <p class="signature first" id="version-class_method">
217
+
218
+ + (<tt>Object</tt>) <strong>version</strong>
219
+
220
+
221
+
222
+ </p><table class="source_code">
223
+ <tr>
224
+ <td>
225
+ <pre class="lines">
226
+
227
+
228
+ 15
229
+ 16
230
+ 17</pre>
231
+ </td>
232
+ <td>
233
+ <pre class="code"><span class="info file"># File 'lib/magpie.rb', line 15</span>
234
+
235
+ <span class='def def kw'>def</span> <span class='version identifier id'>version</span>
236
+ <span class='VERSION constant id'>VERSION</span><span class='dot token'>.</span><span class='join identifier id'>join</span><span class='lparen token'>(</span><span class='string val'>&quot;.&quot;</span><span class='rparen token'>)</span>
237
+ <span class='end end kw'>end</span>
238
+ </pre>
239
+ </td>
240
+ </tr>
241
+ </table>
242
+ </div>
243
+
244
+ </div>
245
+
246
+ </div>
247
+
248
+ <div id="footer">
249
+ Generated on Thu Oct 21 14:14:15 2010 by
250
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
251
+ 0.6.1 (ruby-1.8.7).
252
+ </div>
253
+
254
+ </body>
255
+ </html>
@@ -0,0 +1,254 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta name="Content-Type" content="text/html; charset=utf-8" />
6
+ <title>Class: Magpie::Alipay</title>
7
+ <link rel="stylesheet" href="../css/style.css" type="text/css" media="screen" charset="utf-8" />
8
+ <link rel="stylesheet" href="../css/common.css" type="text/css" media="screen" charset="utf-8" />
9
+
10
+ <script type="text/javascript" charset="utf-8">
11
+ relpath = '..';
12
+ if (relpath != '') relpath += '/';
13
+ </script>
14
+ <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
15
+ <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
16
+
17
+ </head>
18
+ <body>
19
+ <script type="text/javascript" charset="utf-8">
20
+ if (window.top.frames.main) document.body.className = 'frames';
21
+ </script>
22
+
23
+ <div id="header">
24
+ <div id="menu">
25
+
26
+ <a href="../_index.html">Index (A)</a> &raquo;
27
+ <span class='title'><span class='object_link'><a href="../Magpie.html" title="Magpie (module)">Magpie</a></span></span>
28
+ &raquo;
29
+ <span class="title">Alipay</span>
30
+
31
+
32
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
33
+ </div>
34
+
35
+ <div id="search">
36
+ <a id="class_list_link" href="#">Class List</a>
37
+ <a id="method_list_link" href="#">Method List</a>
38
+ <a id ="file_list_link" href="#">File List</a>
39
+ </div>
40
+
41
+ <div class="clear"></div>
42
+ </div>
43
+
44
+ <iframe id="search_frame"></iframe>
45
+
46
+ <div id="content"><h1>Class: Magpie::Alipay
47
+
48
+
49
+
50
+ </h1>
51
+
52
+ <dl class="box">
53
+
54
+ <dt class="r1">Inherits:</dt>
55
+ <dd class="r1">
56
+ <span class="inheritName">Object</span>
57
+
58
+ <ul class="fullTree">
59
+ <li>Object</li>
60
+
61
+ <li class="next">Magpie::Alipay</li>
62
+
63
+ </ul>
64
+ <a href="#" class="inheritanceTree">show all</a>
65
+
66
+ </dd>
67
+
68
+
69
+
70
+
71
+
72
+
73
+ <dt class="r2">Includes:</dt>
74
+ <dd class="r2"><span class='object_link'><a href="Utils.html" title="Magpie::Utils (module)">Utils</a></span></dd>
75
+
76
+
77
+
78
+
79
+
80
+ <dt class="r1 last">Defined in:</dt>
81
+ <dd class="r1 last">lib/middles/alipay.rb</dd>
82
+
83
+ </dl>
84
+ <div class="clear"></div>
85
+
86
+
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+ <h2>
95
+ Instance Method Summary
96
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
97
+ </h2>
98
+
99
+ <ul class="summary">
100
+
101
+ <li class="public ">
102
+ <span class="summary_signature">
103
+
104
+ <a href="#call-instance_method" title="#call (instance method)">- (Object) <strong>call</strong>(env) </a>
105
+
106
+
107
+
108
+ </span>
109
+
110
+
111
+
112
+
113
+
114
+
115
+
116
+
117
+ <span class="summary_desc"><div class='inline'></div></span>
118
+
119
+ </li>
120
+
121
+
122
+ <li class="public ">
123
+ <span class="summary_signature">
124
+
125
+ <a href="#initialize-instance_method" title="#initialize (instance method)">- (Alipay) <strong>initialize</strong>(app, pay_gateway = &quot;https://www.alipay.com/cooperate/gateway.do&quot;) </a>
126
+
127
+
128
+
129
+ </span>
130
+
131
+ <span class="note title constructor">constructor</span>
132
+
133
+
134
+
135
+
136
+
137
+
138
+
139
+
140
+ <span class="summary_desc"><div class='inline'><p>A new instance of Alipay.</p></div></span>
141
+
142
+ </li>
143
+
144
+
145
+ </ul>
146
+
147
+
148
+
149
+
150
+
151
+
152
+
153
+ <div id="constructor_details" class="method_details_list">
154
+ <h2>Constructor Details</h2>
155
+
156
+ <div class="method_details first">
157
+ <p class="signature first" id="initialize-instance_method">
158
+
159
+ - (<tt><span class='object_link'><a href="" title="Magpie::Alipay (class)">Alipay</a></span></tt>) <strong>initialize</strong>(app, pay_gateway = &quot;https://www.alipay.com/cooperate/gateway.do&quot;)
160
+
161
+
162
+
163
+ </p><div class="docstring">
164
+ <div class="discussion">
165
+ <p>A new instance of Alipay</p>
166
+
167
+ </div>
168
+ </div>
169
+ <div class="tags">
170
+
171
+ </div><table class="source_code">
172
+ <tr>
173
+ <td>
174
+ <pre class="lines">
175
+
176
+
177
+ 9
178
+ 10
179
+ 11
180
+ 12</pre>
181
+ </td>
182
+ <td>
183
+ <pre class="code"><span class="info file"># File 'lib/middles/alipay.rb', line 9</span>
184
+
185
+ <span class='def def kw'>def</span> <span class='initialize identifier id'>initialize</span><span class='lparen token'>(</span><span class='app identifier id'>app</span><span class='comma token'>,</span> <span class='pay_gateway identifier id'>pay_gateway</span> <span class='assign token'>=</span> <span class='string val'>&quot;https://www.alipay.com/cooperate/gateway.do&quot;</span><span class='rparen token'>)</span>
186
+ <span class='@app ivar id'>@app</span> <span class='assign token'>=</span> <span class='app identifier id'>app</span>
187
+ <span class='@pay_gateway ivar id'>@pay_gateway</span> <span class='assign token'>=</span> <span class='pay_gateway identifier id'>pay_gateway</span>
188
+ <span class='end end kw'>end</span>
189
+ </pre>
190
+ </td>
191
+ </tr>
192
+ </table>
193
+ </div>
194
+
195
+ </div>
196
+
197
+
198
+ <div id="instance_method_details" class="method_details_list">
199
+ <h2>Instance Method Details</h2>
200
+
201
+
202
+ <div class="method_details first">
203
+ <p class="signature first" id="call-instance_method">
204
+
205
+ - (<tt>Object</tt>) <strong>call</strong>(env)
206
+
207
+
208
+
209
+ </p><table class="source_code">
210
+ <tr>
211
+ <td>
212
+ <pre class="lines">
213
+
214
+
215
+ 14
216
+ 15
217
+ 16
218
+ 17
219
+ 18
220
+ 19
221
+ 20
222
+ 21
223
+ 22</pre>
224
+ </td>
225
+ <td>
226
+ <pre class="code"><span class="info file"># File 'lib/middles/alipay.rb', line 14</span>
227
+
228
+ <span class='def def kw'>def</span> <span class='call identifier id'>call</span><span class='lparen token'>(</span><span class='env identifier id'>env</span><span class='rparen token'>)</span>
229
+ <span class='status identifier id'>status</span><span class='comma token'>,</span> <span class='header identifier id'>header</span><span class='comma token'>,</span> <span class='body identifier id'>body</span> <span class='assign token'>=</span> <span class='@app ivar id'>@app</span><span class='dot token'>.</span><span class='call identifier id'>call</span><span class='lparen token'>(</span><span class='env identifier id'>env</span><span class='rparen token'>)</span>
230
+ <span class='req identifier id'>req</span> <span class='assign token'>=</span> <span class='Rack constant id'>Rack</span><span class='colon2 op'>::</span><span class='Request constant id'>Request</span><span class='dot token'>.</span><span class='new identifier id'>new</span><span class='lparen token'>(</span><span class='env identifier id'>env</span><span class='rparen token'>)</span>
231
+ <span class='doc identifier id'>doc</span> <span class='assign token'>=</span> <span class='send_req_to identifier id'>send_req_to</span> <span class='@pay_gateway ivar id'>@pay_gateway</span><span class='comma token'>,</span> <span class='req identifier id'>req</span>
232
+ <span class='red_text identifier id'>red_text</span> <span class='assign token'>=</span> <span class='lparen token'>(</span><span class='doc identifier id'>doc</span><span class='div op'>/</span><span class='string val'>&quot;//div[@id='Info']/div[@class='ErrorInfo']/div[@class='Todo']&quot;</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='inner_text identifier id'>inner_text</span>
233
+ <span class='red_text identifier id'>red_text</span> <span class='assign token'>=</span> <span class='Iconv constant id'>Iconv</span><span class='dot token'>.</span><span class='iconv identifier id'>iconv</span><span class='lparen token'>(</span><span class='string val'>&quot;UTF-8//IGNORE&quot;</span><span class='comma token'>,</span><span class='string val'>&quot;GBK//IGNORE&quot;</span><span class='comma token'>,</span> <span class='red_text identifier id'>red_text</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='to_s identifier id'>to_s</span>
234
+ <span class='am identifier id'>am</span> <span class='assign token'>=</span> <span class='AlipayModel constant id'>AlipayModel</span><span class='dot token'>.</span><span class='new identifier id'>new</span><span class='lparen token'>(</span><span class='req identifier id'>req</span><span class='dot token'>.</span><span class='params identifier id'>params</span><span class='rparen token'>)</span>
235
+ <span class='lbrack token'>[</span><span class='status identifier id'>status</span><span class='comma token'>,</span> <span class='header identifier id'>header</span><span class='comma token'>,</span> <span class='get_xml_body identifier id'>get_xml_body</span><span class='lparen token'>(</span><span class='env identifier id'>env</span><span class='comma token'>,</span> <span class='am identifier id'>am</span><span class='comma token'>,</span> <span class='red_text identifier id'>red_text</span><span class='rparen token'>)</span><span class='rbrack token'>]</span>
236
+ <span class='end end kw'>end</span>
237
+ </pre>
238
+ </td>
239
+ </tr>
240
+ </table>
241
+ </div>
242
+
243
+ </div>
244
+
245
+ </div>
246
+
247
+ <div id="footer">
248
+ Generated on Thu Oct 21 14:14:15 2010 by
249
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
250
+ 0.6.1 (ruby-1.8.7).
251
+ </div>
252
+
253
+ </body>
254
+ </html>