fakeldap 0.0.1 → 0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (114) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +7 -1
  3. data/lib/fakeldap.rb +133 -10
  4. data/lib/fakeldap/version.rb +1 -1
  5. metadata +50 -191
  6. data/vendor/ruby-ldapserver/COPYING +0 -27
  7. data/vendor/ruby-ldapserver/ChangeLog +0 -83
  8. data/vendor/ruby-ldapserver/Manifest.txt +0 -32
  9. data/vendor/ruby-ldapserver/README +0 -222
  10. data/vendor/ruby-ldapserver/Rakefile +0 -22
  11. data/vendor/ruby-ldapserver/doc/LDAP.html +0 -104
  12. data/vendor/ruby-ldapserver/doc/LDAP/Abandon.html +0 -112
  13. data/vendor/ruby-ldapserver/doc/LDAP/Error.html +0 -115
  14. data/vendor/ruby-ldapserver/doc/LDAP/ResultError.html +0 -241
  15. data/vendor/ruby-ldapserver/doc/LDAP/ResultError/AdminLimitExceeded.html +0 -158
  16. data/vendor/ruby-ldapserver/doc/LDAP/ResultError/AffectsMultipleDSAs.html +0 -158
  17. data/vendor/ruby-ldapserver/doc/LDAP/ResultError/AliasDereferencingProblem.html +0 -158
  18. data/vendor/ruby-ldapserver/doc/LDAP/ResultError/AliasProblem.html +0 -158
  19. data/vendor/ruby-ldapserver/doc/LDAP/ResultError/AttributeOrValueExists.html +0 -158
  20. data/vendor/ruby-ldapserver/doc/LDAP/ResultError/AuthMethodNotSupported.html +0 -158
  21. data/vendor/ruby-ldapserver/doc/LDAP/ResultError/Busy.html +0 -158
  22. data/vendor/ruby-ldapserver/doc/LDAP/ResultError/CompareFalse.html +0 -158
  23. data/vendor/ruby-ldapserver/doc/LDAP/ResultError/CompareTrue.html +0 -158
  24. data/vendor/ruby-ldapserver/doc/LDAP/ResultError/ConfidentialityRequired.html +0 -158
  25. data/vendor/ruby-ldapserver/doc/LDAP/ResultError/ConstraintViolation.html +0 -158
  26. data/vendor/ruby-ldapserver/doc/LDAP/ResultError/EntryAlreadyExists.html +0 -158
  27. data/vendor/ruby-ldapserver/doc/LDAP/ResultError/InappropriateAuthentication.html +0 -158
  28. data/vendor/ruby-ldapserver/doc/LDAP/ResultError/InappropriateMatching.html +0 -158
  29. data/vendor/ruby-ldapserver/doc/LDAP/ResultError/InsufficientAccessRights.html +0 -158
  30. data/vendor/ruby-ldapserver/doc/LDAP/ResultError/InvalidAttributeSyntax.html +0 -158
  31. data/vendor/ruby-ldapserver/doc/LDAP/ResultError/InvalidCredentials.html +0 -158
  32. data/vendor/ruby-ldapserver/doc/LDAP/ResultError/InvalidDNSyntax.html +0 -158
  33. data/vendor/ruby-ldapserver/doc/LDAP/ResultError/IsLeaf.html +0 -158
  34. data/vendor/ruby-ldapserver/doc/LDAP/ResultError/LoopDetect.html +0 -158
  35. data/vendor/ruby-ldapserver/doc/LDAP/ResultError/NamingViolation.html +0 -158
  36. data/vendor/ruby-ldapserver/doc/LDAP/ResultError/NoSuchAttribute.html +0 -158
  37. data/vendor/ruby-ldapserver/doc/LDAP/ResultError/NoSuchObject.html +0 -158
  38. data/vendor/ruby-ldapserver/doc/LDAP/ResultError/NotAllowedOnNonLeaf.html +0 -158
  39. data/vendor/ruby-ldapserver/doc/LDAP/ResultError/NotAllowedOnRDN.html +0 -158
  40. data/vendor/ruby-ldapserver/doc/LDAP/ResultError/ObjectClassModsProhibited.html +0 -158
  41. data/vendor/ruby-ldapserver/doc/LDAP/ResultError/ObjectClassViolation.html +0 -158
  42. data/vendor/ruby-ldapserver/doc/LDAP/ResultError/OperationsError.html +0 -158
  43. data/vendor/ruby-ldapserver/doc/LDAP/ResultError/Other.html +0 -158
  44. data/vendor/ruby-ldapserver/doc/LDAP/ResultError/ProtocolError.html +0 -158
  45. data/vendor/ruby-ldapserver/doc/LDAP/ResultError/Referral.html +0 -158
  46. data/vendor/ruby-ldapserver/doc/LDAP/ResultError/SaslBindInProgress.html +0 -158
  47. data/vendor/ruby-ldapserver/doc/LDAP/ResultError/SizeLimitExceeded.html +0 -158
  48. data/vendor/ruby-ldapserver/doc/LDAP/ResultError/StrongAuthRequired.html +0 -158
  49. data/vendor/ruby-ldapserver/doc/LDAP/ResultError/Success.html +0 -158
  50. data/vendor/ruby-ldapserver/doc/LDAP/ResultError/TimeLimitExceeded.html +0 -158
  51. data/vendor/ruby-ldapserver/doc/LDAP/ResultError/Unavailable.html +0 -158
  52. data/vendor/ruby-ldapserver/doc/LDAP/ResultError/UnavailableCriticalExtension.html +0 -158
  53. data/vendor/ruby-ldapserver/doc/LDAP/ResultError/UndefinedAttributeType.html +0 -158
  54. data/vendor/ruby-ldapserver/doc/LDAP/ResultError/UnwillingToPerform.html +0 -158
  55. data/vendor/ruby-ldapserver/doc/LDAP/Server.html +0 -1056
  56. data/vendor/ruby-ldapserver/doc/LDAP/Server/Connection.html +0 -1353
  57. data/vendor/ruby-ldapserver/doc/LDAP/Server/Filter.html +0 -634
  58. data/vendor/ruby-ldapserver/doc/LDAP/Server/MatchingRule.html +0 -1132
  59. data/vendor/ruby-ldapserver/doc/LDAP/Server/MatchingRule/DefaultMatchingClass.html +0 -219
  60. data/vendor/ruby-ldapserver/doc/LDAP/Server/MatchingRule/Equality.html +0 -170
  61. data/vendor/ruby-ldapserver/doc/LDAP/Server/MatchingRule/IA5Downcase.html +0 -143
  62. data/vendor/ruby-ldapserver/doc/LDAP/Server/MatchingRule/IA5Trim.html +0 -155
  63. data/vendor/ruby-ldapserver/doc/LDAP/Server/MatchingRule/Integer.html +0 -143
  64. data/vendor/ruby-ldapserver/doc/LDAP/Server/MatchingRule/Ordering.html +0 -212
  65. data/vendor/ruby-ldapserver/doc/LDAP/Server/MatchingRule/StringDowncase.html +0 -143
  66. data/vendor/ruby-ldapserver/doc/LDAP/Server/MatchingRule/StringTrim.html +0 -154
  67. data/vendor/ruby-ldapserver/doc/LDAP/Server/MatchingRule/Substrings.html +0 -177
  68. data/vendor/ruby-ldapserver/doc/LDAP/Server/Operation.html +0 -2994
  69. data/vendor/ruby-ldapserver/doc/LDAP/Server/Schema.html +0 -2024
  70. data/vendor/ruby-ldapserver/doc/LDAP/Server/Schema/AttributeType.html +0 -1462
  71. data/vendor/ruby-ldapserver/doc/LDAP/Server/Schema/ObjectClass.html +0 -1097
  72. data/vendor/ruby-ldapserver/doc/LDAP/Server/Syntax.html +0 -1254
  73. data/vendor/ruby-ldapserver/doc/LDAP/Server/VERSION.html +0 -134
  74. data/vendor/ruby-ldapserver/doc/_index.html +0 -662
  75. data/vendor/ruby-ldapserver/doc/class_list.html +0 -36
  76. data/vendor/ruby-ldapserver/doc/css/common.css +0 -1
  77. data/vendor/ruby-ldapserver/doc/css/full_list.css +0 -50
  78. data/vendor/ruby-ldapserver/doc/css/style.css +0 -303
  79. data/vendor/ruby-ldapserver/doc/file.README.html +0 -399
  80. data/vendor/ruby-ldapserver/doc/file_list.html +0 -38
  81. data/vendor/ruby-ldapserver/doc/frames.html +0 -13
  82. data/vendor/ruby-ldapserver/doc/index.html +0 -399
  83. data/vendor/ruby-ldapserver/doc/js/app.js +0 -204
  84. data/vendor/ruby-ldapserver/doc/js/full_list.js +0 -112
  85. data/vendor/ruby-ldapserver/doc/js/jquery.js +0 -154
  86. data/vendor/ruby-ldapserver/doc/method_list.html +0 -1571
  87. data/vendor/ruby-ldapserver/doc/top-level-namespace.html +0 -88
  88. data/vendor/ruby-ldapserver/examples/README +0 -89
  89. data/vendor/ruby-ldapserver/examples/mkcert.rb +0 -31
  90. data/vendor/ruby-ldapserver/examples/rbslapd1.rb +0 -111
  91. data/vendor/ruby-ldapserver/examples/rbslapd2.rb +0 -161
  92. data/vendor/ruby-ldapserver/examples/rbslapd3.rb +0 -172
  93. data/vendor/ruby-ldapserver/examples/speedtest.rb +0 -37
  94. data/vendor/ruby-ldapserver/lib/ldap/server.rb +0 -4
  95. data/vendor/ruby-ldapserver/lib/ldap/server/connection.rb +0 -276
  96. data/vendor/ruby-ldapserver/lib/ldap/server/filter.rb +0 -223
  97. data/vendor/ruby-ldapserver/lib/ldap/server/match.rb +0 -283
  98. data/vendor/ruby-ldapserver/lib/ldap/server/operation.rb +0 -487
  99. data/vendor/ruby-ldapserver/lib/ldap/server/preforkserver.rb +0 -93
  100. data/vendor/ruby-ldapserver/lib/ldap/server/result.rb +0 -71
  101. data/vendor/ruby-ldapserver/lib/ldap/server/schema.rb +0 -592
  102. data/vendor/ruby-ldapserver/lib/ldap/server/server.rb +0 -89
  103. data/vendor/ruby-ldapserver/lib/ldap/server/syntax.rb +0 -235
  104. data/vendor/ruby-ldapserver/lib/ldap/server/tcpserver.rb +0 -91
  105. data/vendor/ruby-ldapserver/lib/ldap/server/util.rb +0 -88
  106. data/vendor/ruby-ldapserver/lib/ldap/server/version.rb +0 -11
  107. data/vendor/ruby-ldapserver/test/core.schema +0 -582
  108. data/vendor/ruby-ldapserver/test/encoding_test.rb +0 -279
  109. data/vendor/ruby-ldapserver/test/filter_test.rb +0 -107
  110. data/vendor/ruby-ldapserver/test/match_test.rb +0 -59
  111. data/vendor/ruby-ldapserver/test/schema_test.rb +0 -113
  112. data/vendor/ruby-ldapserver/test/syntax_test.rb +0 -40
  113. data/vendor/ruby-ldapserver/test/test_helper.rb +0 -2
  114. data/vendor/ruby-ldapserver/test/util_test.rb +0 -51
@@ -1,634 +0,0 @@
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: LDAP::Server::Filter</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 (F)</a> &raquo;
27
- <span class='title'><span class='object_link'><a href="../../LDAP.html" title="LDAP (module)">LDAP</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Server.html" title="LDAP::Server (class)">Server</a></span></span>
28
- &raquo;
29
- <span class="title">Filter</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: LDAP::Server::Filter
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">LDAP::Server::Filter</li>
62
-
63
- </ul>
64
- <a href="#" class="inheritanceTree">show all</a>
65
-
66
- </dd>
67
-
68
-
69
-
70
-
71
-
72
-
73
-
74
-
75
-
76
- <dt class="r2 last">Defined in:</dt>
77
- <dd class="r2 last">lib/ldap/server/filter.rb</dd>
78
-
79
- </dl>
80
- <div class="clear"></div>
81
-
82
- <h2>Overview</h2><div class="docstring">
83
- <div class="discussion">
84
- <p>
85
- LDAP filters are parsed into a LISP-like internal representation:
86
- </p>
87
- <pre class="code">
88
- [:true]
89
- [:false]
90
- [:undef]
91
- [:and, ..., ..., ...]
92
- [:or, ..., ..., ...]
93
- [:not, ...]
94
- [:present, attr]
95
- [:eq, attr, MO, val]
96
- [:approx, attr, MO, val]
97
- [:substrings, attr, MO, initial=nil, {any, any...}, final=nil]
98
- [:ge, attr, MO, val]
99
- [:le, attr, MO, val]
100
- </pre>
101
- <p>
102
- This is done rather than a more object-oriented approach, in the hope that
103
- it will make it easier to match certain filter structures when converting
104
- them into something else. e.g. certain LDAP filter constructs can be mapped
105
- to some fixed SQL queries.
106
- </p>
107
- <p>
108
- See RFC 2251 4.5.1 for the three-state(!) boolean logic from LDAP
109
- </p>
110
- <p>
111
- If no schema is provided: &#8216;attr&#8217; is the raw attribute name as
112
- provided by the client. If a schema is provided: attr is converted to its
113
- normalized name as listed in the schema, e.g. &#8216;commonname&#8217;
114
- becomes &#8216;cn&#8217;, &#8216;objectclass&#8217; becomes
115
- &#8216;objectClass&#8217; etc. If a schema is provided, MO is a matching
116
- object which can be used to perform the match. If no schema is provided,
117
- this is &#8216;nil&#8217;. In that case you could use
118
- LDAP::Server::MatchingRule::DefaultMatch.
119
- </p>
120
-
121
-
122
- </div>
123
- </div>
124
- <div class="tags">
125
-
126
- </div>
127
-
128
-
129
-
130
- <h2>
131
- Class Method Summary
132
- <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
133
- </h2>
134
-
135
- <ul class="summary">
136
-
137
- <li class="public ">
138
- <span class="summary_signature">
139
-
140
- <a href="#parse-class_method" title="parse (class method)">+ (Object) <strong>parse</strong>(asn1, schema = nil) </a>
141
-
142
-
143
-
144
- </span>
145
-
146
-
147
-
148
-
149
-
150
-
151
-
152
-
153
- <span class="summary_desc"><div class='inline'><p>
154
- Parse a filter in OpenSSL::ASN1 format into our own format.
155
- </p>
156
- </div></span>
157
-
158
- </li>
159
-
160
-
161
- <li class="public ">
162
- <span class="summary_signature">
163
-
164
- <a href="#run-class_method" title="run (class method)">+ (Object) <strong>run</strong>(filter, av) </a>
165
-
166
-
167
-
168
- </span>
169
-
170
-
171
-
172
-
173
-
174
-
175
-
176
-
177
- <span class="summary_desc"><div class='inline'><p>
178
- Run a parsed filter against an attr=>[val] hash.
179
- </p>
180
- </div></span>
181
-
182
- </li>
183
-
184
-
185
- </ul>
186
-
187
-
188
-
189
-
190
- <div id="class_method_details" class="method_details_list">
191
- <h2>Class Method Details</h2>
192
-
193
-
194
- <div class="method_details first">
195
- <p class="signature first" id="parse-class_method">
196
-
197
- + (<tt>Object</tt>) <strong>parse</strong>(asn1, schema = nil)
198
-
199
-
200
-
201
- </p><div class="docstring">
202
- <div class="discussion">
203
- <p>
204
- Parse a filter in OpenSSL::ASN1 format into our own format.
205
- </p>
206
- <p>
207
- There are some trivial optimisations we make: e.g.
208
- </p>
209
- <pre class="code">
210
- (&amp;(objectClass=*)(cn=foo)) -&gt; (&amp;(cn=foo)) -&gt; (cn=foo)</pre>
211
-
212
-
213
- </div>
214
- </div>
215
- <div class="tags">
216
-
217
- </div><table class="source_code">
218
- <tr>
219
- <td>
220
- <pre class="lines">
221
-
222
-
223
- 44
224
- 45
225
- 46
226
- 47
227
- 48
228
- 49
229
- 50
230
- 51
231
- 52
232
- 53
233
- 54
234
- 55
235
- 56
236
- 57
237
- 58
238
- 59
239
- 60
240
- 61
241
- 62
242
- 63
243
- 64
244
- 65
245
- 66
246
- 67
247
- 68
248
- 69
249
- 70
250
- 71
251
- 72
252
- 73
253
- 74
254
- 75
255
- 76
256
- 77
257
- 78
258
- 79
259
- 80
260
- 81
261
- 82
262
- 83
263
- 84
264
- 85
265
- 86
266
- 87
267
- 88
268
- 89
269
- 90
270
- 91
271
- 92
272
- 93
273
- 94
274
- 95
275
- 96
276
- 97
277
- 98
278
- 99
279
- 100
280
- 101
281
- 102
282
- 103
283
- 104
284
- 105
285
- 106
286
- 107
287
- 108
288
- 109
289
- 110
290
- 111
291
- 112
292
- 113
293
- 114
294
- 115
295
- 116
296
- 117
297
- 118
298
- 119
299
- 120
300
- 121
301
- 122
302
- 123
303
- 124
304
- 125
305
- 126
306
- 127
307
- 128
308
- 129
309
- 130
310
- 131
311
- 132
312
- 133
313
- 134
314
- 135
315
- 136
316
- 137
317
- 138
318
- 139
319
- 140
320
- 141
321
- 142
322
- 143
323
- 144
324
- 145
325
- 146
326
- 147
327
- 148
328
- 149
329
- 150
330
- 151
331
- 152
332
- 153
333
- 154
334
- 155
335
- 156
336
- 157
337
- 158
338
- 159
339
- 160
340
- 161
341
- 162
342
- 163
343
- 164
344
- 165
345
- 166</pre>
346
- </td>
347
- <td>
348
- <pre class="code"><span class="info file"># File 'lib/ldap/server/filter.rb', line 44</span>
349
-
350
- <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id parse'>parse</span><span class='lparen'>(</span><span class='id asn1'>asn1</span><span class='comma'>,</span> <span class='id schema'>schema</span><span class='op'>=</span><span class='kw'>nil</span><span class='rparen'>)</span>
351
- <span class='kw'>case</span> <span class='id asn1'>asn1</span><span class='period'>.</span><span class='id tag'>tag</span>
352
- <span class='kw'>when</span> <span class='int'>0</span> <span class='comment'># and
353
- </span> <span class='id conds'>conds</span> <span class='op'>=</span> <span class='id asn1'>asn1</span><span class='period'>.</span><span class='id value'>value</span><span class='period'>.</span><span class='id collect'>collect</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id a'>a</span><span class='op'>|</span> <span class='id parse'>parse</span><span class='lparen'>(</span><span class='id a'>a</span><span class='rparen'>)</span> <span class='rbrace'>}</span>
354
- <span class='id conds'>conds</span><span class='period'>.</span><span class='id delete'>delete</span><span class='lparen'>(</span><span class='lbracket'>[</span><span class='symbol'>:true</span><span class='rbracket'>]</span><span class='rparen'>)</span>
355
- <span class='kw'>return</span> <span class='lbracket'>[</span><span class='symbol'>:true</span><span class='rbracket'>]</span> <span class='kw'>if</span> <span class='id conds'>conds</span><span class='period'>.</span><span class='id size'>size</span> <span class='op'>==</span> <span class='int'>0</span>
356
- <span class='kw'>return</span> <span class='id conds'>conds</span><span class='period'>.</span><span class='id first'>first</span> <span class='kw'>if</span> <span class='id conds'>conds</span><span class='period'>.</span><span class='id size'>size</span> <span class='op'>==</span> <span class='int'>1</span>
357
- <span class='kw'>return</span> <span class='lbracket'>[</span><span class='symbol'>:false</span><span class='rbracket'>]</span> <span class='kw'>if</span> <span class='id conds'>conds</span><span class='period'>.</span><span class='id include?'>include?</span><span class='lparen'>(</span><span class='lbracket'>[</span><span class='symbol'>:false</span><span class='rbracket'>]</span><span class='rparen'>)</span>
358
- <span class='kw'>return</span> <span class='id conds'>conds</span><span class='period'>.</span><span class='id unshift'>unshift</span><span class='lparen'>(</span><span class='symbol'>:and</span><span class='rparen'>)</span>
359
-
360
- <span class='kw'>when</span> <span class='int'>1</span> <span class='comment'># or
361
- </span> <span class='id conds'>conds</span> <span class='op'>=</span> <span class='id asn1'>asn1</span><span class='period'>.</span><span class='id value'>value</span><span class='period'>.</span><span class='id collect'>collect</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id a'>a</span><span class='op'>|</span> <span class='id parse'>parse</span><span class='lparen'>(</span><span class='id a'>a</span><span class='rparen'>)</span> <span class='rbrace'>}</span>
362
- <span class='id conds'>conds</span><span class='period'>.</span><span class='id delete'>delete</span><span class='lparen'>(</span><span class='lbracket'>[</span><span class='symbol'>:false</span><span class='rbracket'>]</span><span class='rparen'>)</span>
363
- <span class='kw'>return</span> <span class='lbracket'>[</span><span class='symbol'>:false</span><span class='rbracket'>]</span> <span class='kw'>if</span> <span class='id conds'>conds</span><span class='period'>.</span><span class='id size'>size</span> <span class='op'>==</span> <span class='int'>0</span>
364
- <span class='kw'>return</span> <span class='id conds'>conds</span><span class='period'>.</span><span class='id first'>first</span> <span class='kw'>if</span> <span class='id conds'>conds</span><span class='period'>.</span><span class='id size'>size</span> <span class='op'>==</span> <span class='int'>1</span>
365
- <span class='kw'>return</span> <span class='lbracket'>[</span><span class='symbol'>:true</span><span class='rbracket'>]</span> <span class='kw'>if</span> <span class='id conds'>conds</span><span class='period'>.</span><span class='id include?'>include?</span><span class='lparen'>(</span><span class='lbracket'>[</span><span class='symbol'>:true</span><span class='rbracket'>]</span><span class='rparen'>)</span>
366
- <span class='kw'>return</span> <span class='id conds'>conds</span><span class='period'>.</span><span class='id unshift'>unshift</span><span class='lparen'>(</span><span class='symbol'>:or</span><span class='rparen'>)</span>
367
-
368
- <span class='kw'>when</span> <span class='int'>2</span> <span class='comment'># not
369
- </span> <span class='id cond'>cond</span> <span class='op'>=</span> <span class='id parse'>parse</span><span class='lparen'>(</span><span class='id asn1'>asn1</span><span class='period'>.</span><span class='id value'>value</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='rparen'>)</span>
370
- <span class='kw'>case</span> <span class='id cond'>cond</span>
371
- <span class='kw'>when</span> <span class='lbracket'>[</span><span class='symbol'>:false</span><span class='rbracket'>]</span><span class='semicolon'>;</span> <span class='kw'>return</span> <span class='lbracket'>[</span><span class='symbol'>:true</span><span class='rbracket'>]</span>
372
- <span class='kw'>when</span> <span class='lbracket'>[</span><span class='symbol'>:true</span><span class='rbracket'>]</span><span class='semicolon'>;</span> <span class='kw'>return</span> <span class='lbracket'>[</span><span class='symbol'>:false</span><span class='rbracket'>]</span>
373
- <span class='kw'>when</span> <span class='lbracket'>[</span><span class='symbol'>:undef</span><span class='rbracket'>]</span><span class='semicolon'>;</span> <span class='kw'>return</span> <span class='lbracket'>[</span><span class='symbol'>:undef</span><span class='rbracket'>]</span>
374
- <span class='kw'>end</span>
375
- <span class='kw'>return</span> <span class='lbracket'>[</span><span class='symbol'>:not</span><span class='comma'>,</span> <span class='id cond'>cond</span><span class='rbracket'>]</span>
376
-
377
- <span class='kw'>when</span> <span class='int'>3</span> <span class='comment'># equalityMatch
378
- </span> <span class='id attr'>attr</span> <span class='op'>=</span> <span class='id asn1'>asn1</span><span class='period'>.</span><span class='id value'>value</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id value'>value</span>
379
- <span class='id val'>val</span> <span class='op'>=</span> <span class='id asn1'>asn1</span><span class='period'>.</span><span class='id value'>value</span><span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id value'>value</span>
380
- <span class='kw'>return</span> <span class='lbracket'>[</span><span class='symbol'>:true</span><span class='rbracket'>]</span> <span class='kw'>if</span> <span class='id attr'>attr</span> <span class='op'>=~</span> <span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>\AobjectClass\z</span><span class='regexp_end'>/i</span></span> <span class='kw'>and</span> <span class='id val'>val</span> <span class='op'>=~</span> <span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>\Atop\z</span><span class='regexp_end'>/i</span></span>
381
- <span class='kw'>if</span> <span class='id schema'>schema</span>
382
- <span class='id a'>a</span> <span class='op'>=</span> <span class='id schema'>schema</span><span class='period'>.</span><span class='id find_attrtype'>find_attrtype</span><span class='lparen'>(</span><span class='id attr'>attr</span><span class='rparen'>)</span>
383
- <span class='kw'>return</span> <span class='lbracket'>[</span><span class='symbol'>:undef</span><span class='rbracket'>]</span> <span class='kw'>unless</span> <span class='id a'>a</span><span class='period'>.</span><span class='id equality'>equality</span>
384
- <span class='kw'>return</span> <span class='lbracket'>[</span><span class='symbol'>:eq</span><span class='comma'>,</span> <span class='id a'>a</span><span class='period'>.</span><span class='id to_s'>to_s</span><span class='comma'>,</span> <span class='id a'>a</span><span class='period'>.</span><span class='id equality'>equality</span><span class='comma'>,</span> <span class='id val'>val</span><span class='rbracket'>]</span>
385
- <span class='kw'>end</span>
386
- <span class='kw'>return</span> <span class='lbracket'>[</span><span class='symbol'>:eq</span><span class='comma'>,</span> <span class='id attr'>attr</span><span class='comma'>,</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id val'>val</span><span class='rbracket'>]</span>
387
-
388
- <span class='kw'>when</span> <span class='int'>4</span> <span class='comment'># substrings
389
- </span> <span class='id attr'>attr</span> <span class='op'>=</span> <span class='id asn1'>asn1</span><span class='period'>.</span><span class='id value'>value</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id value'>value</span>
390
- <span class='kw'>if</span> <span class='id schema'>schema</span>
391
- <span class='id a'>a</span> <span class='op'>=</span> <span class='id schema'>schema</span><span class='period'>.</span><span class='id find_attrtype'>find_attrtype</span><span class='lparen'>(</span><span class='id attr'>attr</span><span class='rparen'>)</span>
392
- <span class='kw'>return</span> <span class='lbracket'>[</span><span class='symbol'>:undef</span><span class='rbracket'>]</span> <span class='kw'>unless</span> <span class='id a'>a</span><span class='period'>.</span><span class='id substr'>substr</span>
393
- <span class='id res'>res</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='symbol'>:substrings</span><span class='comma'>,</span> <span class='id a'>a</span><span class='period'>.</span><span class='id to_s'>to_s</span><span class='comma'>,</span> <span class='id a'>a</span><span class='period'>.</span><span class='id substr'>substr</span><span class='comma'>,</span> <span class='kw'>nil</span><span class='rbracket'>]</span>
394
- <span class='kw'>else</span>
395
- <span class='id res'>res</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='symbol'>:substrings</span><span class='comma'>,</span> <span class='id attr'>attr</span><span class='comma'>,</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='kw'>nil</span><span class='rbracket'>]</span>
396
- <span class='kw'>end</span>
397
- <span class='id final_val'>final_val</span> <span class='op'>=</span> <span class='kw'>nil</span>
398
-
399
- <span class='id asn1'>asn1</span><span class='period'>.</span><span class='id value'>value</span><span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id value'>value</span><span class='period'>.</span><span class='id each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id ss'>ss</span><span class='op'>|</span>
400
- <span class='kw'>case</span> <span class='id ss'>ss</span><span class='period'>.</span><span class='id tag'>tag</span>
401
- <span class='kw'>when</span> <span class='int'>0</span>
402
- <span class='id res'>res</span><span class='lbracket'>[</span><span class='int'>3</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id ss'>ss</span><span class='period'>.</span><span class='id value'>value</span>
403
- <span class='kw'>when</span> <span class='int'>1</span>
404
- <span class='id res'>res</span> <span class='op'>&lt;&lt;</span> <span class='id ss'>ss</span><span class='period'>.</span><span class='id value'>value</span>
405
- <span class='kw'>when</span> <span class='int'>2</span>
406
- <span class='id final_val'>final_val</span> <span class='op'>=</span> <span class='id ss'>ss</span><span class='period'>.</span><span class='id value'>value</span>
407
- <span class='kw'>else</span>
408
- <span class='id raise'>raise</span> <span class='const'>LDAP</span><span class='op'>::</span><span class='const'>ResultError</span><span class='op'>::</span><span class='const'>ProtocolError</span><span class='comma'>,</span>
409
- <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Unrecognised substring tag </span><span class='embexpr_beg'>#{</span><span class='id ss'>ss</span><span class='period'>.</span><span class='id tag'>tag</span><span class='period'>.</span><span class='id inspect'>inspect</span><span class='rbrace'>}</span><span class='tstring_end'>&quot;</span></span>
410
- <span class='kw'>end</span>
411
- <span class='kw'>end</span>
412
- <span class='id res'>res</span> <span class='op'>&lt;&lt;</span> <span class='id final_val'>final_val</span>
413
- <span class='kw'>return</span> <span class='id res'>res</span>
414
-
415
- <span class='kw'>when</span> <span class='int'>5</span> <span class='comment'># greaterOrEqual
416
- </span> <span class='id attr'>attr</span> <span class='op'>=</span> <span class='id asn1'>asn1</span><span class='period'>.</span><span class='id value'>value</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id value'>value</span>
417
- <span class='id val'>val</span> <span class='op'>=</span> <span class='id asn1'>asn1</span><span class='period'>.</span><span class='id value'>value</span><span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id value'>value</span>
418
- <span class='kw'>if</span> <span class='id schema'>schema</span>
419
- <span class='id a'>a</span> <span class='op'>=</span> <span class='id schema'>schema</span><span class='period'>.</span><span class='id find_attrtype'>find_attrtype</span><span class='lparen'>(</span><span class='id attr'>attr</span><span class='rparen'>)</span>
420
- <span class='kw'>return</span> <span class='lbracket'>[</span><span class='symbol'>:undef</span><span class='rbracket'>]</span> <span class='kw'>unless</span> <span class='id a'>a</span><span class='period'>.</span><span class='id ordering'>ordering</span>
421
- <span class='kw'>return</span> <span class='lbracket'>[</span><span class='symbol'>:ge</span><span class='comma'>,</span> <span class='id a'>a</span><span class='period'>.</span><span class='id to_s'>to_s</span><span class='comma'>,</span> <span class='id a'>a</span><span class='period'>.</span><span class='id ordering'>ordering</span><span class='comma'>,</span> <span class='id val'>val</span><span class='rbracket'>]</span>
422
- <span class='kw'>end</span>
423
- <span class='kw'>return</span> <span class='lbracket'>[</span><span class='symbol'>:ge</span><span class='comma'>,</span> <span class='id attr'>attr</span><span class='comma'>,</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id val'>val</span><span class='rbracket'>]</span>
424
-
425
- <span class='kw'>when</span> <span class='int'>6</span> <span class='comment'># lessOrEqual
426
- </span> <span class='id attr'>attr</span> <span class='op'>=</span> <span class='id asn1'>asn1</span><span class='period'>.</span><span class='id value'>value</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id value'>value</span>
427
- <span class='id val'>val</span> <span class='op'>=</span> <span class='id asn1'>asn1</span><span class='period'>.</span><span class='id value'>value</span><span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id value'>value</span>
428
- <span class='kw'>if</span> <span class='id schema'>schema</span>
429
- <span class='id a'>a</span> <span class='op'>=</span> <span class='id schema'>schema</span><span class='period'>.</span><span class='id find_attrtype'>find_attrtype</span><span class='lparen'>(</span><span class='id attr'>attr</span><span class='rparen'>)</span>
430
- <span class='kw'>return</span> <span class='lbracket'>[</span><span class='symbol'>:undef</span><span class='rbracket'>]</span> <span class='kw'>unless</span> <span class='id a'>a</span><span class='period'>.</span><span class='id ordering'>ordering</span>
431
- <span class='kw'>return</span> <span class='lbracket'>[</span><span class='symbol'>:le</span><span class='comma'>,</span> <span class='id a'>a</span><span class='period'>.</span><span class='id to_s'>to_s</span><span class='comma'>,</span> <span class='id a'>a</span><span class='period'>.</span><span class='id ordering'>ordering</span><span class='comma'>,</span> <span class='id val'>val</span><span class='rbracket'>]</span>
432
- <span class='kw'>end</span>
433
- <span class='kw'>return</span> <span class='lbracket'>[</span><span class='symbol'>:le</span><span class='comma'>,</span> <span class='id attr'>attr</span><span class='comma'>,</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id val'>val</span><span class='rbracket'>]</span>
434
-
435
- <span class='kw'>when</span> <span class='int'>7</span> <span class='comment'># present
436
- </span> <span class='id attr'>attr</span> <span class='op'>=</span> <span class='id asn1'>asn1</span><span class='period'>.</span><span class='id value'>value</span>
437
- <span class='kw'>return</span> <span class='lbracket'>[</span><span class='symbol'>:true</span><span class='rbracket'>]</span> <span class='kw'>if</span> <span class='id attr'>attr</span> <span class='op'>=~</span> <span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>\AobjectClass\z</span><span class='regexp_end'>/i</span></span>
438
- <span class='kw'>if</span> <span class='id schema'>schema</span>
439
- <span class='kw'>begin</span>
440
- <span class='id a'>a</span> <span class='op'>=</span> <span class='id schema'>schema</span><span class='period'>.</span><span class='id find_attrtype'>find_attrtype</span><span class='lparen'>(</span><span class='id attr'>attr</span><span class='rparen'>)</span>
441
- <span class='kw'>return</span> <span class='lbracket'>[</span><span class='symbol'>:present</span><span class='comma'>,</span> <span class='id a'>a</span><span class='period'>.</span><span class='id to_s'>to_s</span><span class='rbracket'>]</span>
442
- <span class='kw'>rescue</span> <span class='const'>LDAP</span><span class='op'>::</span><span class='const'>ResultError</span><span class='op'>::</span><span class='const'>UndefinedAttributeType</span>
443
- <span class='kw'>return</span> <span class='lbracket'>[</span><span class='symbol'>:false</span><span class='rbracket'>]</span>
444
- <span class='kw'>end</span>
445
- <span class='kw'>end</span>
446
- <span class='kw'>return</span> <span class='lbracket'>[</span><span class='symbol'>:present</span><span class='comma'>,</span> <span class='id attr'>attr</span><span class='rbracket'>]</span>
447
-
448
- <span class='kw'>when</span> <span class='int'>8</span> <span class='comment'># approxMatch
449
- </span> <span class='id attr'>attr</span> <span class='op'>=</span> <span class='id asn1'>asn1</span><span class='period'>.</span><span class='id value'>value</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id value'>value</span>
450
- <span class='id val'>val</span> <span class='op'>=</span> <span class='id asn1'>asn1</span><span class='period'>.</span><span class='id value'>value</span><span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id value'>value</span>
451
- <span class='kw'>if</span> <span class='id schema'>schema</span>
452
- <span class='id a'>a</span> <span class='op'>=</span> <span class='id schema'>schema</span><span class='period'>.</span><span class='id find_attrtype'>find_attrtype</span><span class='lparen'>(</span><span class='id attr'>attr</span><span class='rparen'>)</span>
453
- <span class='comment'># I don't know how properly to deal with approxMatch. I'm assuming
454
- </span> <span class='comment'># that the object will have an equality MatchingRule, and we
455
- </span> <span class='comment'># can defer to that.
456
- </span> <span class='kw'>return</span> <span class='lbracket'>[</span><span class='symbol'>:undef</span><span class='rbracket'>]</span> <span class='kw'>unless</span> <span class='id a'>a</span><span class='period'>.</span><span class='id equality'>equality</span>
457
- <span class='kw'>return</span> <span class='lbracket'>[</span><span class='symbol'>:approx</span><span class='comma'>,</span> <span class='id a'>a</span><span class='period'>.</span><span class='id to_s'>to_s</span><span class='comma'>,</span> <span class='id a'>a</span><span class='period'>.</span><span class='id equality'>equality</span><span class='comma'>,</span> <span class='id val'>val</span><span class='rbracket'>]</span>
458
- <span class='kw'>end</span>
459
- <span class='kw'>return</span> <span class='lbracket'>[</span><span class='symbol'>:approx</span><span class='comma'>,</span> <span class='id attr'>attr</span><span class='comma'>,</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id val'>val</span><span class='rbracket'>]</span>
460
-
461
- <span class='comment'>#when 9 # extensibleMatch
462
- </span> <span class='comment'># FIXME
463
- </span>
464
- <span class='kw'>else</span>
465
- <span class='id raise'>raise</span> <span class='const'>LDAP</span><span class='op'>::</span><span class='const'>ResultError</span><span class='op'>::</span><span class='const'>ProtocolError</span><span class='comma'>,</span>
466
- <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Unrecognised Filter tag </span><span class='embexpr_beg'>#{</span><span class='id asn1'>asn1</span><span class='period'>.</span><span class='id tag'>tag</span><span class='rbrace'>}</span><span class='tstring_end'>&quot;</span></span>
467
- <span class='kw'>end</span>
468
-
469
- <span class='comment'># Unknown attribute type
470
- </span><span class='kw'>rescue</span> <span class='const'>LDAP</span><span class='op'>::</span><span class='const'>ResultError</span><span class='op'>::</span><span class='const'>UndefinedAttributeType</span>
471
- <span class='kw'>return</span> <span class='lbracket'>[</span><span class='symbol'>:undef</span><span class='rbracket'>]</span>
472
- <span class='kw'>end</span></pre>
473
- </td>
474
- </tr>
475
- </table>
476
- </div>
477
-
478
- <div class="method_details ">
479
- <p class="signature " id="run-class_method">
480
-
481
- + (<tt>Object</tt>) <strong>run</strong>(filter, av)
482
-
483
-
484
-
485
- </p><div class="docstring">
486
- <div class="discussion">
487
- <p>
488
- Run a parsed filter against an attr=>[val] hash.
489
- </p>
490
- <p>
491
- Returns true, false or nil.
492
- </p>
493
-
494
-
495
- </div>
496
- </div>
497
- <div class="tags">
498
- <h3>Raises:</h3>
499
- <ul class="raise">
500
-
501
- <li>
502
-
503
- <span class='type'>(<tt><span class='object_link'><a href="../ResultError/OperationsError.html" title="LDAP::ResultError::OperationsError (class)">LDAP::ResultError::OperationsError</a></span></tt>)</span>
504
-
505
-
506
-
507
-
508
- </li>
509
-
510
- </ul>
511
-
512
- </div><table class="source_code">
513
- <tr>
514
- <td>
515
- <pre class="lines">
516
-
517
-
518
- 172
519
- 173
520
- 174
521
- 175
522
- 176
523
- 177
524
- 178
525
- 179
526
- 180
527
- 181
528
- 182
529
- 183
530
- 184
531
- 185
532
- 186
533
- 187
534
- 188
535
- 189
536
- 190
537
- 191
538
- 192
539
- 193
540
- 194
541
- 195
542
- 196
543
- 197
544
- 198
545
- 199
546
- 200
547
- 201
548
- 202
549
- 203
550
- 204
551
- 205
552
- 206
553
- 207
554
- 208
555
- 209
556
- 210
557
- 211
558
- 212
559
- 213
560
- 214
561
- 215
562
- 216
563
- 217
564
- 218
565
- 219</pre>
566
- </td>
567
- <td>
568
- <pre class="code"><span class="info file"># File 'lib/ldap/server/filter.rb', line 172</span>
569
-
570
- <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id run'>run</span><span class='lparen'>(</span><span class='id filter'>filter</span><span class='comma'>,</span> <span class='id av'>av</span><span class='rparen'>)</span>
571
- <span class='kw'>case</span> <span class='id filter'>filter</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span>
572
- <span class='kw'>when</span> <span class='symbol'>:and</span>
573
- <span class='id res'>res</span> <span class='op'>=</span> <span class='kw'>true</span>
574
- <span class='id filter'>filter</span><span class='lbracket'>[</span><span class='int'>1</span><span class='op'>..</span><span class='op'>-</span><span class='int'>1</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id elem'>elem</span><span class='op'>|</span>
575
- <span class='id r'>r</span> <span class='op'>=</span> <span class='id run'>run</span><span class='lparen'>(</span><span class='id elem'>elem</span><span class='comma'>,</span> <span class='id av'>av</span><span class='rparen'>)</span>
576
- <span class='kw'>return</span> <span class='kw'>false</span> <span class='kw'>if</span> <span class='id r'>r</span> <span class='op'>==</span> <span class='kw'>false</span>
577
- <span class='id res'>res</span> <span class='op'>=</span> <span class='kw'>nil</span> <span class='kw'>if</span> <span class='id r'>r</span><span class='period'>.</span><span class='id nil?'>nil?</span>
578
- <span class='kw'>end</span>
579
- <span class='kw'>return</span> <span class='id res'>res</span>
580
-
581
- <span class='kw'>when</span> <span class='symbol'>:or</span>
582
- <span class='id res'>res</span> <span class='op'>=</span> <span class='kw'>false</span>
583
- <span class='id filter'>filter</span><span class='lbracket'>[</span><span class='int'>1</span><span class='op'>..</span><span class='op'>-</span><span class='int'>1</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id elem'>elem</span><span class='op'>|</span>
584
- <span class='id r'>r</span> <span class='op'>=</span> <span class='id run'>run</span><span class='lparen'>(</span><span class='id elem'>elem</span><span class='comma'>,</span> <span class='id av'>av</span><span class='rparen'>)</span>
585
- <span class='kw'>return</span> <span class='kw'>true</span> <span class='kw'>if</span> <span class='id r'>r</span> <span class='op'>==</span> <span class='kw'>true</span>
586
- <span class='id res'>res</span> <span class='op'>=</span> <span class='kw'>nil</span> <span class='kw'>if</span> <span class='id r'>r</span><span class='period'>.</span><span class='id nil?'>nil?</span>
587
- <span class='kw'>end</span>
588
- <span class='kw'>return</span> <span class='id res'>res</span>
589
-
590
- <span class='kw'>when</span> <span class='symbol'>:not</span>
591
- <span class='kw'>case</span> <span class='id run'>run</span><span class='lparen'>(</span><span class='id filter'>filter</span><span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='id av'>av</span><span class='rparen'>)</span>
592
- <span class='kw'>when</span> <span class='kw'>true</span><span class='semicolon'>;</span> <span class='kw'>return</span> <span class='kw'>false</span>
593
- <span class='kw'>when</span> <span class='kw'>false</span><span class='semicolon'>;</span> <span class='kw'>return</span> <span class='kw'>true</span>
594
- <span class='kw'>else</span> <span class='kw'>return</span> <span class='kw'>nil</span>
595
- <span class='kw'>end</span>
596
-
597
- <span class='kw'>when</span> <span class='symbol'>:present</span>
598
- <span class='kw'>return</span> <span class='id av'>av</span><span class='period'>.</span><span class='id has_key?'>has_key?</span><span class='lparen'>(</span><span class='id filter'>filter</span><span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span><span class='rparen'>)</span>
599
-
600
- <span class='kw'>when</span> <span class='symbol'>:eq</span><span class='comma'>,</span> <span class='symbol'>:approx</span><span class='comma'>,</span> <span class='symbol'>:le</span><span class='comma'>,</span> <span class='symbol'>:ge</span><span class='comma'>,</span> <span class='symbol'>:substrings</span>
601
- <span class='comment'># the filter now includes a suitable matching object
602
- </span> <span class='kw'>return</span> <span class='lparen'>(</span><span class='id filter'>filter</span><span class='lbracket'>[</span><span class='int'>2</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='const'>LDAP</span><span class='op'>::</span><span class='const'>Server</span><span class='op'>::</span><span class='const'>MatchingRule</span><span class='op'>::</span><span class='const'>DefaultMatch</span><span class='rparen'>)</span><span class='period'>.</span><span class='id send'>send</span><span class='lparen'>(</span>
603
- <span class='id filter'>filter</span><span class='period'>.</span><span class='id first'>first</span><span class='comma'>,</span> <span class='id av'>av</span><span class='lbracket'>[</span><span class='id filter'>filter</span><span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id to_s'>to_s</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='op'>*</span><span class='id filter'>filter</span><span class='lbracket'>[</span><span class='int'>3</span><span class='op'>..</span><span class='op'>-</span><span class='int'>1</span><span class='rbracket'>]</span><span class='rparen'>)</span>
604
-
605
- <span class='kw'>when</span> <span class='symbol'>:true</span>
606
- <span class='kw'>return</span> <span class='kw'>true</span>
607
-
608
- <span class='kw'>when</span> <span class='symbol'>:false</span>
609
- <span class='kw'>return</span> <span class='kw'>false</span>
610
-
611
- <span class='kw'>when</span> <span class='symbol'>:undef</span>
612
- <span class='kw'>return</span> <span class='kw'>nil</span>
613
- <span class='kw'>end</span>
614
-
615
- <span class='id raise'>raise</span> <span class='const'>LDAP</span><span class='op'>::</span><span class='const'>ResultError</span><span class='op'>::</span><span class='const'>OperationsError</span><span class='comma'>,</span>
616
- <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Unimplemented filter </span><span class='embexpr_beg'>#{</span><span class='id filter'>filter</span><span class='period'>.</span><span class='id first'>first</span><span class='period'>.</span><span class='id inspect'>inspect</span><span class='rbrace'>}</span><span class='tstring_end'>&quot;</span></span>
617
- <span class='kw'>end</span></pre>
618
- </td>
619
- </tr>
620
- </table>
621
- </div>
622
-
623
- </div>
624
-
625
- </div>
626
-
627
- <div id="footer">
628
- Generated on Mon Sep 13 13:27:16 2010 by
629
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
630
- 0.6.0 (ruby-1.9.2).
631
- </div>
632
-
633
- </body>
634
- </html>