exact4r 0.9.3 → 1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGELOG +3 -0
- data/README +0 -11
- data/Rakefile +38 -6
- data/VERSION +1 -1
- data/lib/ews/transaction/request.rb +4 -0
- data/lib/ews/transaction/validator.rb +2 -0
- data/lib/ews/transporter.rb +4 -2
- data/test/credentials.rb +62 -0
- data/test/credentials.yml +53 -0
- data/test/exhaustive/batch_query_close_test.rb +193 -0
- data/test/exhaustive/forced_post_test.rb +3 -3
- data/test/exhaustive/online_debit_purchase_test.rb +9 -5
- data/test/exhaustive/online_debit_refund_test.rb +9 -5
- data/test/exhaustive/pre_auth_completion_test.rb +3 -3
- data/test/exhaustive/pre_auth_only_test.rb +9 -3
- data/test/exhaustive/pre_auth_test.rb +3 -3
- data/test/exhaustive/purchase_correction_test.rb +13 -7
- data/test/exhaustive/purchase_test.rb +3 -3
- data/test/exhaustive/recurring_seed_pre_auth_test.rb +3 -3
- data/test/exhaustive/recurring_seed_purchase_test.rb +3 -3
- data/test/exhaustive/refund_correction_test.rb +12 -6
- data/test/exhaustive/refund_test.rb +3 -3
- data/test/exhaustive/secure_storage_test.rb +3 -3
- data/test/exhaustive/tagged_online_debit_refund_test.rb +64 -37
- data/test/exhaustive/tagged_pre_auth_completion_test.rb +8 -8
- data/test/exhaustive/tagged_pre_auth_test.rb +8 -8
- data/test/exhaustive/tagged_purchase_test.rb +8 -8
- data/test/exhaustive/tagged_refund_test.rb +9 -9
- data/test/exhaustive/tagged_void_test.rb +24 -10
- data/test/exhaustive/transaction_details_test.rb +8 -6
- data/test/exhaustive/void_test.rb +9 -3
- data/test/general/avs_test.rb +7 -7
- data/test/general/request_test.rb +20 -37
- data/test/general/transporter_test.rb +6 -6
- data/test/general/validator_test.rb +2 -2
- data/test/test_helper.rb +8 -18
- metadata +5 -27
- data/doc/classes/EWS/Transaction/FakeResponse.html +0 -451
- data/doc/classes/EWS/Transaction/Request.html +0 -469
- data/doc/classes/EWS/Transaction/Response.html +0 -472
- data/doc/classes/EWS/Transaction/Validator.html +0 -182
- data/doc/classes/EWS/Transporter.html +0 -269
- data/doc/classes/REXML/Document.html +0 -176
- data/doc/classes/REXML/Entity.html +0 -150
- data/doc/classes/REXML.html +0 -112
- data/doc/created.rid +0 -1
- data/doc/files/CHANGELOG.html +0 -156
- data/doc/files/LICENCE.html +0 -109
- data/doc/files/README.html +0 -371
- data/doc/files/VERSION.html +0 -107
- data/doc/files/lib/ews/transaction/fake_response_rb.html +0 -101
- data/doc/files/lib/ews/transaction/mapping_rb.html +0 -108
- data/doc/files/lib/ews/transaction/request_rb.html +0 -108
- data/doc/files/lib/ews/transaction/response_rb.html +0 -101
- data/doc/files/lib/ews/transaction/validator_rb.html +0 -101
- data/doc/files/lib/ews/transporter_rb.html +0 -108
- data/doc/files/lib/exact4r_rb.html +0 -117
- data/doc/fr_class_index.html +0 -34
- data/doc/fr_file_index.html +0 -37
- data/doc/fr_method_index.html +0 -48
- data/doc/index.html +0 -24
- data/doc/rdoc-style.css +0 -208
@@ -1,269 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
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: EWS::Transporter</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
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">EWS::Transporter</td>
|
54
|
-
</tr>
|
55
|
-
<tr class="top-aligned-row">
|
56
|
-
<td><strong>In:</strong></td>
|
57
|
-
<td>
|
58
|
-
<a href="../../files/lib/ews/transporter_rb.html">
|
59
|
-
lib/ews/transporter.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
|
-
A <a href="Transporter.html">Transporter</a> is responsible for
|
84
|
-
communicating with the E-xact Web Service in whichever dialect is chosen by
|
85
|
-
the user. The available options are:
|
86
|
-
</p>
|
87
|
-
<pre>
|
88
|
-
:json REST with JSON payload
|
89
|
-
:rest REST with XML payload (default)
|
90
|
-
:soap SOAP
|
91
|
-
</pre>
|
92
|
-
<p>
|
93
|
-
The <a href="Transporter.html">Transporter</a> will connect to the service,
|
94
|
-
using SSL if required, and will encode Reqests to send to the service, and
|
95
|
-
decode Responses received from the service.
|
96
|
-
</p>
|
97
|
-
<p>
|
98
|
-
Once configured to connect to a particular service, it can be used
|
99
|
-
repeatedly to send as many transactions as required.
|
100
|
-
</p>
|
101
|
-
|
102
|
-
</div>
|
103
|
-
|
104
|
-
|
105
|
-
</div>
|
106
|
-
|
107
|
-
<div id="method-list">
|
108
|
-
<h3 class="section-bar">Methods</h3>
|
109
|
-
|
110
|
-
<div class="name-list">
|
111
|
-
<a href="#M000018">new</a>
|
112
|
-
<a href="#M000019">submit</a>
|
113
|
-
</div>
|
114
|
-
</div>
|
115
|
-
|
116
|
-
</div>
|
117
|
-
|
118
|
-
|
119
|
-
<!-- if includes -->
|
120
|
-
|
121
|
-
<div id="section">
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
<!-- if method_list -->
|
131
|
-
<div id="methods">
|
132
|
-
<h3 class="section-bar">Public Class methods</h3>
|
133
|
-
|
134
|
-
<div id="method-M000018" class="method-detail">
|
135
|
-
<a name="M000018"></a>
|
136
|
-
|
137
|
-
<div class="method-heading">
|
138
|
-
<a href="#M000018" class="method-signature">
|
139
|
-
<span class="method-name">new</span><span class="method-args">(url = "https://api.e-xact.com", options = {})</span>
|
140
|
-
</a>
|
141
|
-
</div>
|
142
|
-
|
143
|
-
<div class="method-description">
|
144
|
-
<p>
|
145
|
-
Initialize a <a href="Transporter.html">Transporter</a>.
|
146
|
-
</p>
|
147
|
-
<p>
|
148
|
-
You can specify the URL you would like the <a
|
149
|
-
href="Transporter.html">Transporter</a> to connect to, although it defaults
|
150
|
-
to <a href="https://api.e-xact.com">api.e-xact.com</a>, the location of our
|
151
|
-
transaction processing web service.
|
152
|
-
</p>
|
153
|
-
<p>
|
154
|
-
You can also specify a hash of options as follows:
|
155
|
-
</p>
|
156
|
-
<pre>
|
157
|
-
:transport_type the transport_type for this transporter (defaults to :rest)
|
158
|
-
</pre>
|
159
|
-
<p>
|
160
|
-
The default certificates are those required to connect to <a
|
161
|
-
href="https://api.e-xact.com">api.e-xact.com</a> and the default
|
162
|
-
<tt>transport_type</tt> is <tt>:rest</tt>. The default
|
163
|
-
<tt>transport_type</tt> can be overridden on a per-transaction basis, if
|
164
|
-
you choose to do so, by specifying it as a parameter to the <tt><a
|
165
|
-
href="Transporter.html#M000019">submit</a></tt> method.
|
166
|
-
</p>
|
167
|
-
<p><a class="source-toggle" href="#"
|
168
|
-
onclick="toggleCode('M000018-source');return false;">[Source]</a></p>
|
169
|
-
<div class="method-source-code" id="M000018-source">
|
170
|
-
<pre>
|
171
|
-
<span class="ruby-comment cmt"># File lib/ews/transporter.rb, line 30</span>
|
172
|
-
30: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">url</span> = <span class="ruby-value str">"https://api.e-xact.com"</span>, <span class="ruby-identifier">options</span> = {})
|
173
|
-
31: <span class="ruby-ivar">@url</span> = <span class="ruby-constant">URI</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-identifier">url</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-regexp re">/\/$/</span>,<span class="ruby-value str">''</span>))
|
174
|
-
32: <span class="ruby-ivar">@transport_type</span> = <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:transport_type</span>] <span class="ruby-operator">||</span> <span class="ruby-identifier">:rest</span>
|
175
|
-
33:
|
176
|
-
34: <span class="ruby-ivar">@@issuer_cert</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">dirname</span>(<span class="ruby-keyword kw">__FILE__</span>)<span class="ruby-operator">+</span><span class="ruby-value str">"/../../certs/equifax_ca.cer"</span>
|
177
|
-
35: <span class="ruby-ivar">@@server_cert</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">dirname</span>(<span class="ruby-keyword kw">__FILE__</span>)<span class="ruby-operator">+</span><span class="ruby-value str">"/../../certs/exact.cer"</span>).<span class="ruby-identifier">read</span>
|
178
|
-
36: <span class="ruby-keyword kw">end</span>
|
179
|
-
</pre>
|
180
|
-
</div>
|
181
|
-
</div>
|
182
|
-
</div>
|
183
|
-
|
184
|
-
<h3 class="section-bar">Public Instance methods</h3>
|
185
|
-
|
186
|
-
<div id="method-M000019" class="method-detail">
|
187
|
-
<a name="M000019"></a>
|
188
|
-
|
189
|
-
<div class="method-heading">
|
190
|
-
<a href="#M000019" class="method-signature">
|
191
|
-
<span class="method-name">submit</span><span class="method-args">(transaction, transport_type = nil)</span>
|
192
|
-
</a>
|
193
|
-
</div>
|
194
|
-
|
195
|
-
<div class="method-description">
|
196
|
-
<p>
|
197
|
-
Submit a transaction request to the server
|
198
|
-
</p>
|
199
|
-
<table>
|
200
|
-
<tr><td valign="top"><tt>transaction</tt>:</td><td>the Request object to encode for transmission to the server
|
201
|
-
|
202
|
-
</td></tr>
|
203
|
-
<tr><td valign="top"><tt>transport_type</tt>:</td><td>(optional) the transport type to use for this transaction only. If it is
|
204
|
-
not specified, the <a href="Transporter.html">Transporter</a>‘s
|
205
|
-
transport type will be used
|
206
|
-
|
207
|
-
</td></tr>
|
208
|
-
</table>
|
209
|
-
<p><a class="source-toggle" href="#"
|
210
|
-
onclick="toggleCode('M000019-source');return false;">[Source]</a></p>
|
211
|
-
<div class="method-source-code" id="M000019-source">
|
212
|
-
<pre>
|
213
|
-
<span class="ruby-comment cmt"># File lib/ews/transporter.rb, line 42</span>
|
214
|
-
42: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">submit</span>(<span class="ruby-identifier">transaction</span>, <span class="ruby-identifier">transport_type</span> = <span class="ruby-keyword kw">nil</span>)
|
215
|
-
43: <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-value str">"Request not supplied"</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">transaction</span>.<span class="ruby-identifier">nil?</span>
|
216
|
-
44: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">transaction</span>.<span class="ruby-identifier">valid?</span>
|
217
|
-
45:
|
218
|
-
46: <span class="ruby-identifier">transport_type</span> <span class="ruby-operator">||=</span> <span class="ruby-ivar">@transport_type</span>
|
219
|
-
47:
|
220
|
-
48: <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-node">"Transport type #{transport_type} is not supported"</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@@transport_types</span>.<span class="ruby-identifier">include?</span> <span class="ruby-identifier">transport_type</span>
|
221
|
-
49:
|
222
|
-
50: <span class="ruby-identifier">transport_details</span> = <span class="ruby-ivar">@@transport_types</span>[<span class="ruby-identifier">transport_type</span>]
|
223
|
-
51:
|
224
|
-
52: <span class="ruby-identifier">request</span> = <span class="ruby-identifier">build_http_request</span>(<span class="ruby-identifier">transaction</span>, <span class="ruby-identifier">transport_type</span>, <span class="ruby-identifier">transport_details</span>[<span class="ruby-identifier">:suffix</span>])
|
225
|
-
53: <span class="ruby-identifier">request</span>.<span class="ruby-identifier">basic_auth</span>(<span class="ruby-identifier">transaction</span>.<span class="ruby-identifier">gateway_id</span>, <span class="ruby-identifier">transaction</span>.<span class="ruby-identifier">password</span>)
|
226
|
-
54: <span class="ruby-identifier">request</span>.<span class="ruby-identifier">add_field</span> <span class="ruby-value str">"Accept"</span>, <span class="ruby-identifier">transport_details</span>[<span class="ruby-identifier">:content_type</span>]
|
227
|
-
55: <span class="ruby-identifier">request</span>.<span class="ruby-identifier">add_field</span> <span class="ruby-value str">"User-Agent"</span>, <span class="ruby-value str">"exact4r v0.9.1"</span>
|
228
|
-
56: <span class="ruby-identifier">request</span>.<span class="ruby-identifier">add_field</span> <span class="ruby-value str">"Content-type"</span>, <span class="ruby-node">"#{transport_details[:content_type]}; charset=UTF-8"</span>
|
229
|
-
57:
|
230
|
-
58: <span class="ruby-identifier">response</span> = <span class="ruby-identifier">get_connection</span>.<span class="ruby-identifier">request</span>(<span class="ruby-identifier">request</span>)
|
231
|
-
59:
|
232
|
-
60: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">response</span>
|
233
|
-
61: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">Net</span><span class="ruby-operator">::</span><span class="ruby-constant">HTTPSuccess</span> <span class="ruby-keyword kw">then</span> <span class="ruby-constant">EWS</span><span class="ruby-operator">::</span><span class="ruby-constant">Transaction</span><span class="ruby-operator">::</span><span class="ruby-constant">Mapping</span>.<span class="ruby-identifier">send</span> <span class="ruby-node">"#{transport_type}_to_response"</span>, <span class="ruby-identifier">response</span>.<span class="ruby-identifier">body</span>
|
234
|
-
62: <span class="ruby-keyword kw">else</span>
|
235
|
-
63: <span class="ruby-identifier">r</span> = <span class="ruby-operator">::</span><span class="ruby-constant">EWS</span><span class="ruby-operator">::</span><span class="ruby-constant">Transaction</span><span class="ruby-operator">::</span><span class="ruby-constant">Response</span>.<span class="ruby-identifier">new</span>
|
236
|
-
64: <span class="ruby-keyword kw">if</span>(<span class="ruby-identifier">transport_type</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">:soap</span>)
|
237
|
-
65: <span class="ruby-comment cmt"># we may have a SOAP Fault</span>
|
238
|
-
66: <span class="ruby-identifier">r</span> = <span class="ruby-constant">EWS</span><span class="ruby-operator">::</span><span class="ruby-constant">Transaction</span><span class="ruby-operator">::</span><span class="ruby-constant">Mapping</span>.<span class="ruby-identifier">send</span> <span class="ruby-node">"#{transport_type}_to_response"</span>, <span class="ruby-identifier">response</span>.<span class="ruby-identifier">body</span>
|
239
|
-
67: <span class="ruby-keyword kw">end</span>
|
240
|
-
68:
|
241
|
-
69: <span class="ruby-comment cmt"># SOAP Fault may already have populated the error_number etc.</span>
|
242
|
-
70: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">r</span>.<span class="ruby-identifier">error_number</span>
|
243
|
-
71: <span class="ruby-comment cmt"># populate the error number and description</span>
|
244
|
-
72: <span class="ruby-identifier">r</span>.<span class="ruby-identifier">error_number</span> = <span class="ruby-identifier">response</span>.<span class="ruby-identifier">code</span>.<span class="ruby-identifier">to_i</span>
|
245
|
-
73: <span class="ruby-identifier">r</span>.<span class="ruby-identifier">error_description</span> = <span class="ruby-identifier">response</span>.<span class="ruby-identifier">message</span>
|
246
|
-
74: <span class="ruby-keyword kw">end</span>
|
247
|
-
75:
|
248
|
-
76: <span class="ruby-identifier">r</span>
|
249
|
-
77: <span class="ruby-keyword kw">end</span>
|
250
|
-
78:
|
251
|
-
79: <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,176 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
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: REXML::Document</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
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">REXML::Document</td>
|
54
|
-
</tr>
|
55
|
-
<tr class="top-aligned-row">
|
56
|
-
<td><strong>In:</strong></td>
|
57
|
-
<td>
|
58
|
-
<a href="../../files/lib/exact4r_rb.html">
|
59
|
-
lib/exact4r.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
|
-
Element
|
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
|
-
|
82
|
-
|
83
|
-
</div>
|
84
|
-
|
85
|
-
<div id="method-list">
|
86
|
-
<h3 class="section-bar">Methods</h3>
|
87
|
-
|
88
|
-
<div class="name-list">
|
89
|
-
<a href="#M000021">entity_expansion_limit=</a>
|
90
|
-
<a href="#M000022">record_entity_expansion!</a>
|
91
|
-
</div>
|
92
|
-
</div>
|
93
|
-
|
94
|
-
</div>
|
95
|
-
|
96
|
-
|
97
|
-
<!-- if includes -->
|
98
|
-
|
99
|
-
<div id="section">
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
<!-- if method_list -->
|
109
|
-
<div id="methods">
|
110
|
-
<h3 class="section-bar">Public Class methods</h3>
|
111
|
-
|
112
|
-
<div id="method-M000021" class="method-detail">
|
113
|
-
<a name="M000021"></a>
|
114
|
-
|
115
|
-
<div class="method-heading">
|
116
|
-
<a href="#M000021" class="method-signature">
|
117
|
-
<span class="method-name">entity_expansion_limit=</span><span class="method-args">(val)</span>
|
118
|
-
</a>
|
119
|
-
</div>
|
120
|
-
|
121
|
-
<div class="method-description">
|
122
|
-
<p><a class="source-toggle" href="#"
|
123
|
-
onclick="toggleCode('M000021-source');return false;">[Source]</a></p>
|
124
|
-
<div class="method-source-code" id="M000021-source">
|
125
|
-
<pre>
|
126
|
-
<span class="ruby-comment cmt"># File lib/exact4r.rb, line 27</span>
|
127
|
-
27: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">entity_expansion_limit=</span> <span class="ruby-identifier">val</span>
|
128
|
-
28: <span class="ruby-ivar">@@entity_expansion_limit</span> = <span class="ruby-identifier">val</span>
|
129
|
-
29: <span class="ruby-keyword kw">end</span>
|
130
|
-
</pre>
|
131
|
-
</div>
|
132
|
-
</div>
|
133
|
-
</div>
|
134
|
-
|
135
|
-
<h3 class="section-bar">Public Instance methods</h3>
|
136
|
-
|
137
|
-
<div id="method-M000022" class="method-detail">
|
138
|
-
<a name="M000022"></a>
|
139
|
-
|
140
|
-
<div class="method-heading">
|
141
|
-
<a href="#M000022" class="method-signature">
|
142
|
-
<span class="method-name">record_entity_expansion!</span><span class="method-args">()</span>
|
143
|
-
</a>
|
144
|
-
</div>
|
145
|
-
|
146
|
-
<div class="method-description">
|
147
|
-
<p><a class="source-toggle" href="#"
|
148
|
-
onclick="toggleCode('M000022-source');return false;">[Source]</a></p>
|
149
|
-
<div class="method-source-code" id="M000022-source">
|
150
|
-
<pre>
|
151
|
-
<span class="ruby-comment cmt"># File lib/exact4r.rb, line 31</span>
|
152
|
-
31: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">record_entity_expansion!</span>
|
153
|
-
32: <span class="ruby-ivar">@number_of_expansions</span> <span class="ruby-operator">||=</span> <span class="ruby-value">0</span>
|
154
|
-
33: <span class="ruby-ivar">@number_of_expansions</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
|
155
|
-
34: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@number_of_expansions</span> <span class="ruby-operator">></span> <span class="ruby-ivar">@@entity_expansion_limit</span>
|
156
|
-
35: <span class="ruby-identifier">raise</span> <span class="ruby-value str">"Number of entity expansions exceeded, processing aborted."</span>
|
157
|
-
36: <span class="ruby-keyword kw">end</span>
|
158
|
-
37: <span class="ruby-keyword kw">end</span>
|
159
|
-
</pre>
|
160
|
-
</div>
|
161
|
-
</div>
|
162
|
-
</div>
|
163
|
-
|
164
|
-
|
165
|
-
</div>
|
166
|
-
|
167
|
-
|
168
|
-
</div>
|
169
|
-
|
170
|
-
|
171
|
-
<div id="validator-badges">
|
172
|
-
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
173
|
-
</div>
|
174
|
-
|
175
|
-
</body>
|
176
|
-
</html>
|
@@ -1,150 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
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: REXML::Entity</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
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">REXML::Entity</td>
|
54
|
-
</tr>
|
55
|
-
<tr class="top-aligned-row">
|
56
|
-
<td><strong>In:</strong></td>
|
57
|
-
<td>
|
58
|
-
<a href="../../files/lib/exact4r_rb.html">
|
59
|
-
lib/exact4r.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
|
-
Child
|
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
|
-
|
82
|
-
|
83
|
-
</div>
|
84
|
-
|
85
|
-
<div id="method-list">
|
86
|
-
<h3 class="section-bar">Methods</h3>
|
87
|
-
|
88
|
-
<div class="name-list">
|
89
|
-
<a href="#M000020">unnormalized</a>
|
90
|
-
</div>
|
91
|
-
</div>
|
92
|
-
|
93
|
-
</div>
|
94
|
-
|
95
|
-
|
96
|
-
<!-- if includes -->
|
97
|
-
|
98
|
-
<div id="section">
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
<!-- if method_list -->
|
108
|
-
<div id="methods">
|
109
|
-
<h3 class="section-bar">Public Instance methods</h3>
|
110
|
-
|
111
|
-
<div id="method-M000020" class="method-detail">
|
112
|
-
<a name="M000020"></a>
|
113
|
-
|
114
|
-
<div class="method-heading">
|
115
|
-
<a href="#M000020" class="method-signature">
|
116
|
-
<span class="method-name">unnormalized</span><span class="method-args">()</span>
|
117
|
-
</a>
|
118
|
-
</div>
|
119
|
-
|
120
|
-
<div class="method-description">
|
121
|
-
<p><a class="source-toggle" href="#"
|
122
|
-
onclick="toggleCode('M000020-source');return false;">[Source]</a></p>
|
123
|
-
<div class="method-source-code" id="M000020-source">
|
124
|
-
<pre>
|
125
|
-
<span class="ruby-comment cmt"># File lib/exact4r.rb, line 17</span>
|
126
|
-
17: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">unnormalized</span>
|
127
|
-
18: <span class="ruby-identifier">document</span>.<span class="ruby-identifier">record_entity_expansion!</span>
|
128
|
-
19: <span class="ruby-identifier">v</span> = <span class="ruby-identifier">value</span>()
|
129
|
-
20: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">v</span>.<span class="ruby-identifier">nil?</span>
|
130
|
-
21: <span class="ruby-ivar">@unnormalized</span> = <span class="ruby-constant">Text</span><span class="ruby-operator">::</span><span class="ruby-identifier">unnormalize</span>(<span class="ruby-identifier">v</span>, <span class="ruby-identifier">parent</span>)
|
131
|
-
22: <span class="ruby-ivar">@unnormalized</span>
|
132
|
-
23: <span class="ruby-keyword kw">end</span>
|
133
|
-
</pre>
|
134
|
-
</div>
|
135
|
-
</div>
|
136
|
-
</div>
|
137
|
-
|
138
|
-
|
139
|
-
</div>
|
140
|
-
|
141
|
-
|
142
|
-
</div>
|
143
|
-
|
144
|
-
|
145
|
-
<div id="validator-badges">
|
146
|
-
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
147
|
-
</div>
|
148
|
-
|
149
|
-
</body>
|
150
|
-
</html>
|