stub_requests 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +5 -2
- data/.reek.yml +1 -0
- data/.rubocop.yml +33 -35
- data/.simplecov +14 -8
- data/.yardopts +1 -1
- data/CHANGELOG.md +4 -1
- data/README.md +19 -11
- data/Rakefile +1 -3
- data/bin/update_docs.sh +16 -0
- data/gemfiles/webmock_2.3.gemfile.lock +1 -1
- data/gemfiles/webmock_3.5.gemfile.lock +1 -1
- data/gemfiles/webmock_develop.gemfile.lock +1 -1
- data/lib/rspec/subject_as_lambda.rb +138 -0
- data/lib/stub_requests/api.rb +42 -8
- data/lib/stub_requests/argument_validation.rb +17 -6
- data/lib/stub_requests/configuration.rb +21 -0
- data/lib/stub_requests/core_ext/all.rb +4 -0
- data/lib/stub_requests/core_ext/array/extract_options.rb +32 -0
- data/lib/stub_requests/core_ext/class/attribute.rb +61 -0
- data/lib/stub_requests/core_ext/kernel/singleton_class.rb +12 -0
- data/lib/stub_requests/core_ext/module/redefine_method.rb +44 -0
- data/lib/stub_requests/core_ext/object/blank.rb +99 -155
- data/lib/stub_requests/endpoint.rb +28 -30
- data/lib/stub_requests/endpoint_registry.rb +18 -16
- data/lib/stub_requests/exceptions.rb +84 -0
- data/lib/stub_requests/hash_util.rb +2 -0
- data/lib/stub_requests/metrics/endpoint_stat.rb +97 -0
- data/lib/stub_requests/metrics/registry.rb +132 -0
- data/lib/stub_requests/metrics/stub_stat.rb +80 -0
- data/lib/stub_requests/metrics.rb +32 -0
- data/lib/stub_requests/property/validator.rb +136 -0
- data/lib/stub_requests/property.rb +99 -0
- data/lib/stub_requests/service.rb +12 -53
- data/lib/stub_requests/service_registry.rb +8 -9
- data/lib/stub_requests/stub_requests.rb +23 -51
- data/lib/stub_requests/uri/builder.rb +5 -1
- data/lib/stub_requests/uri/scheme.rb +3 -1
- data/lib/stub_requests/uri/suffix.rb +5 -0
- data/lib/stub_requests/uri/validator.rb +3 -1
- data/lib/stub_requests/uri.rb +34 -0
- data/lib/stub_requests/version.rb +1 -1
- data/lib/stub_requests/webmock/builder.rb +116 -0
- data/lib/stub_requests/webmock/stub_registry_extension.rb +46 -0
- data/lib/stub_requests.rb +21 -3
- metadata +19 -49
- data/docs/.gitkeep +0 -0
- data/docs/Array.html +0 -137
- data/docs/FalseClass.html +0 -232
- data/docs/Hash.html +0 -137
- data/docs/NilClass.html +0 -232
- data/docs/Numeric.html +0 -233
- data/docs/Object.html +0 -396
- data/docs/String.html +0 -298
- data/docs/StubRequests/API.html +0 -651
- data/docs/StubRequests/ArgumentValidation.html +0 -309
- data/docs/StubRequests/Endpoint.html +0 -1187
- data/docs/StubRequests/EndpointNotFound.html +0 -157
- data/docs/StubRequests/EndpointRegistry.html +0 -1527
- data/docs/StubRequests/Error.html +0 -153
- data/docs/StubRequests/HashUtil.html +0 -304
- data/docs/StubRequests/InvalidType.html +0 -252
- data/docs/StubRequests/InvalidUri.html +0 -252
- data/docs/StubRequests/Service.html +0 -1307
- data/docs/StubRequests/ServiceHaveEndpoints.html +0 -244
- data/docs/StubRequests/ServiceNotFound.html +0 -252
- data/docs/StubRequests/ServiceRegistry.html +0 -1031
- data/docs/StubRequests/URI/Builder.html +0 -1194
- data/docs/StubRequests/URI/Scheme.html +0 -315
- data/docs/StubRequests/URI/Suffix.html +0 -315
- data/docs/StubRequests/URI/Validator.html +0 -770
- data/docs/StubRequests/URI.html +0 -144
- data/docs/StubRequests/UriSegmentMismatch.html +0 -157
- data/docs/StubRequests/WebMockBuilder.html +0 -887
- data/docs/StubRequests.html +0 -452
- data/docs/Time.html +0 -232
- data/docs/TrueClass.html +0 -232
- data/docs/_config.yml +0 -1
- data/docs/_index.html +0 -391
- data/docs/class_list.html +0 -51
- data/docs/css/common.css +0 -1
- data/docs/css/full_list.css +0 -58
- data/docs/css/style.css +0 -496
- data/docs/file.README.html +0 -225
- data/docs/file_list.html +0 -56
- data/docs/frames.html +0 -17
- data/docs/index.html +0 -225
- data/docs/js/app.js +0 -292
- data/docs/js/full_list.js +0 -216
- data/docs/js/jquery.js +0 -4
- data/docs/method_list.html +0 -707
- data/docs/top-level-namespace.html +0 -112
- data/lib/stub_requests/webmock_builder.rb +0 -108
@@ -1,1307 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<meta charset="utf-8">
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6
|
-
<title>
|
7
|
-
Class: StubRequests::Service
|
8
|
-
|
9
|
-
— Documentation by YARD 0.9.18
|
10
|
-
|
11
|
-
</title>
|
12
|
-
|
13
|
-
<link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
|
14
|
-
|
15
|
-
<link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
|
16
|
-
|
17
|
-
<script type="text/javascript" charset="utf-8">
|
18
|
-
pathId = "StubRequests::Service";
|
19
|
-
relpath = '../';
|
20
|
-
</script>
|
21
|
-
|
22
|
-
|
23
|
-
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
24
|
-
|
25
|
-
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
|
26
|
-
|
27
|
-
|
28
|
-
</head>
|
29
|
-
<body>
|
30
|
-
<div class="nav_wrap">
|
31
|
-
<iframe id="nav" src="../class_list.html?1"></iframe>
|
32
|
-
<div id="resizer"></div>
|
33
|
-
</div>
|
34
|
-
|
35
|
-
<div id="main" tabindex="-1">
|
36
|
-
<div id="header">
|
37
|
-
<div id="menu">
|
38
|
-
|
39
|
-
<a href="../_index.html">Index (S)</a> »
|
40
|
-
<span class='title'><span class='object_link'><a href="../StubRequests.html" title="StubRequests (module)">StubRequests</a></span></span>
|
41
|
-
»
|
42
|
-
<span class="title">Service</span>
|
43
|
-
|
44
|
-
</div>
|
45
|
-
|
46
|
-
<div id="search">
|
47
|
-
|
48
|
-
<a class="full_list_link" id="class_list_link"
|
49
|
-
href="../class_list.html">
|
50
|
-
|
51
|
-
<svg width="24" height="24">
|
52
|
-
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
53
|
-
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
54
|
-
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
55
|
-
</svg>
|
56
|
-
</a>
|
57
|
-
|
58
|
-
</div>
|
59
|
-
<div class="clear"></div>
|
60
|
-
</div>
|
61
|
-
|
62
|
-
<div id="content"><h1>Class: StubRequests::Service
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
</h1>
|
67
|
-
<div class="box_info">
|
68
|
-
|
69
|
-
<dl>
|
70
|
-
<dt>Inherits:</dt>
|
71
|
-
<dd>
|
72
|
-
<span class="inheritName"><span class='object_link'><a href="../Object.html" title="Object (class)">Object</a></span></span>
|
73
|
-
|
74
|
-
<ul class="fullTree">
|
75
|
-
<li><span class='object_link'><a href="../Object.html" title="Object (class)">Object</a></span></li>
|
76
|
-
|
77
|
-
<li class="next">StubRequests::Service</li>
|
78
|
-
|
79
|
-
</ul>
|
80
|
-
<a href="#" class="inheritanceTree">show all</a>
|
81
|
-
|
82
|
-
</dd>
|
83
|
-
</dl>
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
<dl>
|
91
|
-
<dt>Includes:</dt>
|
92
|
-
<dd>Comparable, <span class='object_link'><a href="ArgumentValidation.html" title="StubRequests::ArgumentValidation (module)">ArgumentValidation</a></span></dd>
|
93
|
-
</dl>
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
<dl>
|
101
|
-
<dt>Defined in:</dt>
|
102
|
-
<dd>lib/stub_requests/service.rb</dd>
|
103
|
-
</dl>
|
104
|
-
|
105
|
-
</div>
|
106
|
-
|
107
|
-
<h2>Overview</h2><div class="docstring">
|
108
|
-
<div class="discussion">
|
109
|
-
<p>Class Service provides details for a registered service</p>
|
110
|
-
|
111
|
-
|
112
|
-
</div>
|
113
|
-
</div>
|
114
|
-
<div class="tags">
|
115
|
-
|
116
|
-
<p class="tag_title">Since:</p>
|
117
|
-
<ul class="since">
|
118
|
-
|
119
|
-
<li>
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
<div class='inline'><p>0.1.0</p>
|
126
|
-
</div>
|
127
|
-
|
128
|
-
</li>
|
129
|
-
|
130
|
-
</ul>
|
131
|
-
|
132
|
-
</div>
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
<h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
|
137
|
-
<ul class="summary">
|
138
|
-
|
139
|
-
<li class="public ">
|
140
|
-
<span class="summary_signature">
|
141
|
-
|
142
|
-
<a href="#endpoint_registry-instance_method" title="#endpoint_registry (instance method)">#<strong>endpoint_registry</strong> ⇒ Object </a>
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
</span>
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
160
|
-
|
161
|
-
</li>
|
162
|
-
|
163
|
-
|
164
|
-
<li class="public ">
|
165
|
-
<span class="summary_signature">
|
166
|
-
|
167
|
-
<a href="#id-instance_method" title="#id (instance method)">#<strong>id</strong> ⇒ Object </a>
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
</span>
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
185
|
-
|
186
|
-
</li>
|
187
|
-
|
188
|
-
|
189
|
-
<li class="public ">
|
190
|
-
<span class="summary_signature">
|
191
|
-
|
192
|
-
<a href="#uri-instance_method" title="#uri (instance method)">#<strong>uri</strong> ⇒ Object </a>
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
</span>
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
210
|
-
|
211
|
-
</li>
|
212
|
-
|
213
|
-
|
214
|
-
</ul>
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
<h2>
|
221
|
-
Instance Method Summary
|
222
|
-
<small><a href="#" class="summary_toggle">collapse</a></small>
|
223
|
-
</h2>
|
224
|
-
|
225
|
-
<ul class="summary">
|
226
|
-
|
227
|
-
<li class="public ">
|
228
|
-
<span class="summary_signature">
|
229
|
-
|
230
|
-
<a href="#<=>-instance_method" title="#<=> (instance method)">#<strong><=></strong>(other) ⇒ Object </a>
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
</span>
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
245
|
-
|
246
|
-
</li>
|
247
|
-
|
248
|
-
|
249
|
-
<li class="public ">
|
250
|
-
<span class="summary_signature">
|
251
|
-
|
252
|
-
<a href="#endpoints%3F-instance_method" title="#endpoints? (instance method)">#<strong>endpoints?</strong> ⇒ true, false </a>
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
</span>
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
<span class="summary_desc"><div class='inline'><p>Check if the endpoint registry has endpoints.</p>
|
267
|
-
</div></span>
|
268
|
-
|
269
|
-
</li>
|
270
|
-
|
271
|
-
|
272
|
-
<li class="public ">
|
273
|
-
<span class="summary_signature">
|
274
|
-
|
275
|
-
<a href="#get_endpoint-instance_method" title="#get_endpoint (instance method)">#<strong>get_endpoint</strong>(endpoint_id) ⇒ Endpoint<sup>?</sup> </a>
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
</span>
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
<span class="summary_desc"><div class='inline'><p>Gets an endpoint from the <span class='object_link'><a href="#endpoint_registry-instance_method" title="StubRequests::Service#endpoint_registry (method)">#endpoint_registry</a></span> collection.</p>
|
290
|
-
</div></span>
|
291
|
-
|
292
|
-
</li>
|
293
|
-
|
294
|
-
|
295
|
-
<li class="public ">
|
296
|
-
<span class="summary_signature">
|
297
|
-
|
298
|
-
<a href="#get_endpoint!-instance_method" title="#get_endpoint! (instance method)">#<strong>get_endpoint!</strong>(endpoint_id) ⇒ Endpoint </a>
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
</span>
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
<span class="summary_desc"><div class='inline'><p>Gets an endpoint from the <span class='object_link'><a href="#endpoint_registry-instance_method" title="StubRequests::Service#endpoint_registry (method)">#endpoint_registry</a></span> collection.</p>
|
313
|
-
</div></span>
|
314
|
-
|
315
|
-
</li>
|
316
|
-
|
317
|
-
|
318
|
-
<li class="public ">
|
319
|
-
<span class="summary_signature">
|
320
|
-
|
321
|
-
<a href="#hash-instance_method" title="#hash (instance method)">#<strong>hash</strong> ⇒ Object </a>
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
</span>
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
336
|
-
|
337
|
-
</li>
|
338
|
-
|
339
|
-
|
340
|
-
<li class="public ">
|
341
|
-
<span class="summary_signature">
|
342
|
-
|
343
|
-
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(service_id, service_uri) ⇒ Service </a>
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
</span>
|
348
|
-
|
349
|
-
|
350
|
-
<span class="note title constructor">constructor</span>
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
<span class="summary_desc"><div class='inline'><p>Initializes a new instance of a Service.</p>
|
360
|
-
</div></span>
|
361
|
-
|
362
|
-
</li>
|
363
|
-
|
364
|
-
|
365
|
-
<li class="public ">
|
366
|
-
<span class="summary_signature">
|
367
|
-
|
368
|
-
<a href="#register_endpoint-instance_method" title="#register_endpoint (instance method)">#<strong>register_endpoint</strong>(endpoint_id, verb, uri_template, default_options = {}) ⇒ Endpoint </a>
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
</span>
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
<span class="summary_desc"><div class='inline'><p>Registers a new endpoint or updates an existing one.</p>
|
383
|
-
</div></span>
|
384
|
-
|
385
|
-
</li>
|
386
|
-
|
387
|
-
|
388
|
-
<li class="public ">
|
389
|
-
<span class="summary_signature">
|
390
|
-
|
391
|
-
<a href="#to_s-instance_method" title="#to_s (instance method)">#<strong>to_s</strong> ⇒ String </a>
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
</span>
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
<span class="summary_desc"><div class='inline'><p>Returns a nicely formatted string with this service.</p>
|
406
|
-
</div></span>
|
407
|
-
|
408
|
-
</li>
|
409
|
-
|
410
|
-
|
411
|
-
</ul>
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
<h3 class="inherited">Methods included from <span class='object_link'><a href="ArgumentValidation.html" title="StubRequests::ArgumentValidation (module)">ArgumentValidation</a></span></h3>
|
425
|
-
<p class="inherited"><span class='object_link'><a href="ArgumentValidation.html#validate!-instance_method" title="StubRequests::ArgumentValidation#validate! (method)">#validate!</a></span></p>
|
426
|
-
<div id="constructor_details" class="method_details_list">
|
427
|
-
<h2>Constructor Details</h2>
|
428
|
-
|
429
|
-
<div class="method_details first">
|
430
|
-
<h3 class="signature first" id="initialize-instance_method">
|
431
|
-
|
432
|
-
#<strong>initialize</strong>(service_id, service_uri) ⇒ <tt><span class='object_link'><a href="" title="StubRequests::Service (class)">Service</a></span></tt>
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
</h3><div class="docstring">
|
439
|
-
<div class="discussion">
|
440
|
-
<p>Initializes a new instance of a Service</p>
|
441
|
-
|
442
|
-
|
443
|
-
</div>
|
444
|
-
</div>
|
445
|
-
<div class="tags">
|
446
|
-
<p class="tag_title">Parameters:</p>
|
447
|
-
<ul class="param">
|
448
|
-
|
449
|
-
<li>
|
450
|
-
|
451
|
-
<span class='name'>service_id</span>
|
452
|
-
|
453
|
-
|
454
|
-
<span class='type'>(<tt>Symbol</tt>)</span>
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
—
|
459
|
-
<div class='inline'><p>the id of this service</p>
|
460
|
-
</div>
|
461
|
-
|
462
|
-
</li>
|
463
|
-
|
464
|
-
<li>
|
465
|
-
|
466
|
-
<span class='name'>service_uri</span>
|
467
|
-
|
468
|
-
|
469
|
-
<span class='type'>(<tt><span class='object_link'><a href="../String.html" title="String (class)">String</a></span></tt>)</span>
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
—
|
474
|
-
<div class='inline'><p>the base uri to reach the service</p>
|
475
|
-
</div>
|
476
|
-
|
477
|
-
</li>
|
478
|
-
|
479
|
-
</ul>
|
480
|
-
|
481
|
-
<p class="tag_title">Since:</p>
|
482
|
-
<ul class="since">
|
483
|
-
|
484
|
-
<li>
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
|
490
|
-
<div class='inline'><p>0.1.0</p>
|
491
|
-
</div>
|
492
|
-
|
493
|
-
</li>
|
494
|
-
|
495
|
-
</ul>
|
496
|
-
|
497
|
-
</div><table class="source_code">
|
498
|
-
<tr>
|
499
|
-
<td>
|
500
|
-
<pre class="lines">
|
501
|
-
|
502
|
-
|
503
|
-
35
|
504
|
-
36
|
505
|
-
37
|
506
|
-
38
|
507
|
-
39
|
508
|
-
40
|
509
|
-
41
|
510
|
-
42</pre>
|
511
|
-
</td>
|
512
|
-
<td>
|
513
|
-
<pre class="code"><span class="info file"># File 'lib/stub_requests/service.rb', line 35</span>
|
514
|
-
|
515
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_service_id'>service_id</span><span class='comma'>,</span> <span class='id identifier rubyid_service_uri'>service_uri</span><span class='rparen'>)</span>
|
516
|
-
<span class='id identifier rubyid_validate!'>validate!</span> <span class='id identifier rubyid_service_id'>service_id</span><span class='comma'>,</span> <span class='label'>is_a:</span> <span class='const'>Symbol</span>
|
517
|
-
<span class='id identifier rubyid_validate!'>validate!</span> <span class='id identifier rubyid_service_uri'>service_uri</span><span class='comma'>,</span> <span class='label'>is_a:</span> <span class='const'><span class='object_link'><a href="../String.html" title="String (class)">String</a></span></span>
|
518
|
-
|
519
|
-
<span class='ivar'>@id</span> <span class='op'>=</span> <span class='id identifier rubyid_service_id'>service_id</span>
|
520
|
-
<span class='ivar'>@uri</span> <span class='op'>=</span> <span class='id identifier rubyid_service_uri'>service_uri</span>
|
521
|
-
<span class='ivar'>@endpoint_registry</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="EndpointRegistry.html" title="StubRequests::EndpointRegistry (class)">EndpointRegistry</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="EndpointRegistry.html#initialize-instance_method" title="StubRequests::EndpointRegistry#initialize (method)">new</a></span></span>
|
522
|
-
<span class='kw'>end</span></pre>
|
523
|
-
</td>
|
524
|
-
</tr>
|
525
|
-
</table>
|
526
|
-
</div>
|
527
|
-
|
528
|
-
</div>
|
529
|
-
|
530
|
-
<div id="instance_attr_details" class="attr_details">
|
531
|
-
<h2>Instance Attribute Details</h2>
|
532
|
-
|
533
|
-
|
534
|
-
<span id="endpoint_registry=-instance_method"></span>
|
535
|
-
<div class="method_details first">
|
536
|
-
<h3 class="signature first" id="endpoint_registry-instance_method">
|
537
|
-
|
538
|
-
#<strong>endpoint_registry</strong> ⇒ <tt><span class='object_link'><a href="../Object.html" title="Object (class)">Object</a></span></tt>
|
539
|
-
|
540
|
-
|
541
|
-
|
542
|
-
|
543
|
-
|
544
|
-
</h3><div class="docstring">
|
545
|
-
<div class="discussion">
|
546
|
-
|
547
|
-
|
548
|
-
</div>
|
549
|
-
</div>
|
550
|
-
<div class="tags">
|
551
|
-
|
552
|
-
<p class="tag_title">Since:</p>
|
553
|
-
<ul class="since">
|
554
|
-
|
555
|
-
<li>
|
556
|
-
|
557
|
-
|
558
|
-
|
559
|
-
|
560
|
-
|
561
|
-
<div class='inline'><p>0.1.0</p>
|
562
|
-
</div>
|
563
|
-
|
564
|
-
</li>
|
565
|
-
|
566
|
-
</ul>
|
567
|
-
|
568
|
-
</div><table class="source_code">
|
569
|
-
<tr>
|
570
|
-
<td>
|
571
|
-
<pre class="lines">
|
572
|
-
|
573
|
-
|
574
|
-
27
|
575
|
-
28
|
576
|
-
29</pre>
|
577
|
-
</td>
|
578
|
-
<td>
|
579
|
-
<pre class="code"><span class="info file"># File 'lib/stub_requests/service.rb', line 27</span>
|
580
|
-
|
581
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_endpoint_registry'>endpoint_registry</span>
|
582
|
-
<span class='ivar'>@endpoint_registry</span>
|
583
|
-
<span class='kw'>end</span></pre>
|
584
|
-
</td>
|
585
|
-
</tr>
|
586
|
-
</table>
|
587
|
-
</div>
|
588
|
-
|
589
|
-
|
590
|
-
<span id="id=-instance_method"></span>
|
591
|
-
<div class="method_details ">
|
592
|
-
<h3 class="signature " id="id-instance_method">
|
593
|
-
|
594
|
-
#<strong>id</strong> ⇒ <tt><span class='object_link'><a href="../Object.html" title="Object (class)">Object</a></span></tt>
|
595
|
-
|
596
|
-
|
597
|
-
|
598
|
-
|
599
|
-
|
600
|
-
</h3><div class="docstring">
|
601
|
-
<div class="discussion">
|
602
|
-
|
603
|
-
|
604
|
-
</div>
|
605
|
-
</div>
|
606
|
-
<div class="tags">
|
607
|
-
|
608
|
-
<p class="tag_title">Since:</p>
|
609
|
-
<ul class="since">
|
610
|
-
|
611
|
-
<li>
|
612
|
-
|
613
|
-
|
614
|
-
|
615
|
-
|
616
|
-
|
617
|
-
<div class='inline'><p>0.1.0</p>
|
618
|
-
</div>
|
619
|
-
|
620
|
-
</li>
|
621
|
-
|
622
|
-
</ul>
|
623
|
-
|
624
|
-
</div><table class="source_code">
|
625
|
-
<tr>
|
626
|
-
<td>
|
627
|
-
<pre class="lines">
|
628
|
-
|
629
|
-
|
630
|
-
19
|
631
|
-
20
|
632
|
-
21</pre>
|
633
|
-
</td>
|
634
|
-
<td>
|
635
|
-
<pre class="code"><span class="info file"># File 'lib/stub_requests/service.rb', line 19</span>
|
636
|
-
|
637
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_id'>id</span>
|
638
|
-
<span class='ivar'>@id</span>
|
639
|
-
<span class='kw'>end</span></pre>
|
640
|
-
</td>
|
641
|
-
</tr>
|
642
|
-
</table>
|
643
|
-
</div>
|
644
|
-
|
645
|
-
|
646
|
-
<span id="uri=-instance_method"></span>
|
647
|
-
<div class="method_details ">
|
648
|
-
<h3 class="signature " id="uri-instance_method">
|
649
|
-
|
650
|
-
#<strong>uri</strong> ⇒ <tt><span class='object_link'><a href="../Object.html" title="Object (class)">Object</a></span></tt>
|
651
|
-
|
652
|
-
|
653
|
-
|
654
|
-
|
655
|
-
|
656
|
-
</h3><div class="docstring">
|
657
|
-
<div class="discussion">
|
658
|
-
|
659
|
-
|
660
|
-
</div>
|
661
|
-
</div>
|
662
|
-
<div class="tags">
|
663
|
-
|
664
|
-
<p class="tag_title">Since:</p>
|
665
|
-
<ul class="since">
|
666
|
-
|
667
|
-
<li>
|
668
|
-
|
669
|
-
|
670
|
-
|
671
|
-
|
672
|
-
|
673
|
-
<div class='inline'><p>0.1.0</p>
|
674
|
-
</div>
|
675
|
-
|
676
|
-
</li>
|
677
|
-
|
678
|
-
</ul>
|
679
|
-
|
680
|
-
</div><table class="source_code">
|
681
|
-
<tr>
|
682
|
-
<td>
|
683
|
-
<pre class="lines">
|
684
|
-
|
685
|
-
|
686
|
-
23
|
687
|
-
24
|
688
|
-
25</pre>
|
689
|
-
</td>
|
690
|
-
<td>
|
691
|
-
<pre class="code"><span class="info file"># File 'lib/stub_requests/service.rb', line 23</span>
|
692
|
-
|
693
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_uri'>uri</span>
|
694
|
-
<span class='ivar'>@uri</span>
|
695
|
-
<span class='kw'>end</span></pre>
|
696
|
-
</td>
|
697
|
-
</tr>
|
698
|
-
</table>
|
699
|
-
</div>
|
700
|
-
|
701
|
-
</div>
|
702
|
-
|
703
|
-
|
704
|
-
<div id="instance_method_details" class="method_details_list">
|
705
|
-
<h2>Instance Method Details</h2>
|
706
|
-
|
707
|
-
|
708
|
-
<div class="method_details first">
|
709
|
-
<h3 class="signature first" id="<=>-instance_method">
|
710
|
-
|
711
|
-
#<strong><=></strong>(other) ⇒ <tt><span class='object_link'><a href="../Object.html" title="Object (class)">Object</a></span></tt>
|
712
|
-
|
713
|
-
|
714
|
-
|
715
|
-
|
716
|
-
|
717
|
-
</h3><div class="docstring">
|
718
|
-
<div class="discussion">
|
719
|
-
|
720
|
-
|
721
|
-
</div>
|
722
|
-
</div>
|
723
|
-
<div class="tags">
|
724
|
-
|
725
|
-
<p class="tag_title">Since:</p>
|
726
|
-
<ul class="since">
|
727
|
-
|
728
|
-
<li>
|
729
|
-
|
730
|
-
|
731
|
-
|
732
|
-
|
733
|
-
|
734
|
-
<div class='inline'><p>0.1.0</p>
|
735
|
-
</div>
|
736
|
-
|
737
|
-
</li>
|
738
|
-
|
739
|
-
</ul>
|
740
|
-
|
741
|
-
</div><table class="source_code">
|
742
|
-
<tr>
|
743
|
-
<td>
|
744
|
-
<pre class="lines">
|
745
|
-
|
746
|
-
|
747
|
-
108
|
748
|
-
109
|
749
|
-
110</pre>
|
750
|
-
</td>
|
751
|
-
<td>
|
752
|
-
<pre class="code"><span class="info file"># File 'lib/stub_requests/service.rb', line 108</span>
|
753
|
-
|
754
|
-
<span class='kw'>def</span> <span class='op'><=></span><span class='lparen'>(</span><span class='id identifier rubyid_other'>other</span><span class='rparen'>)</span>
|
755
|
-
<span class='id identifier rubyid_id'>id</span> <span class='op'><=></span> <span class='id identifier rubyid_other'>other</span><span class='period'>.</span><span class='id identifier rubyid_id'>id</span>
|
756
|
-
<span class='kw'>end</span></pre>
|
757
|
-
</td>
|
758
|
-
</tr>
|
759
|
-
</table>
|
760
|
-
</div>
|
761
|
-
|
762
|
-
<div class="method_details ">
|
763
|
-
<h3 class="signature " id="endpoints?-instance_method">
|
764
|
-
|
765
|
-
#<strong>endpoints?</strong> ⇒ <tt>true</tt>, <tt>false</tt>
|
766
|
-
|
767
|
-
|
768
|
-
|
769
|
-
|
770
|
-
|
771
|
-
</h3><div class="docstring">
|
772
|
-
<div class="discussion">
|
773
|
-
<p>Check if the endpoint registry has endpoints</p>
|
774
|
-
|
775
|
-
|
776
|
-
</div>
|
777
|
-
</div>
|
778
|
-
<div class="tags">
|
779
|
-
|
780
|
-
<p class="tag_title">Returns:</p>
|
781
|
-
<ul class="return">
|
782
|
-
|
783
|
-
<li>
|
784
|
-
|
785
|
-
|
786
|
-
<span class='type'>(<tt>true</tt>, <tt>false</tt>)</span>
|
787
|
-
|
788
|
-
|
789
|
-
|
790
|
-
</li>
|
791
|
-
|
792
|
-
</ul>
|
793
|
-
<p class="tag_title">Since:</p>
|
794
|
-
<ul class="since">
|
795
|
-
|
796
|
-
<li>
|
797
|
-
|
798
|
-
|
799
|
-
|
800
|
-
|
801
|
-
|
802
|
-
<div class='inline'><p>0.1.0</p>
|
803
|
-
</div>
|
804
|
-
|
805
|
-
</li>
|
806
|
-
|
807
|
-
</ul>
|
808
|
-
|
809
|
-
</div><table class="source_code">
|
810
|
-
<tr>
|
811
|
-
<td>
|
812
|
-
<pre class="lines">
|
813
|
-
|
814
|
-
|
815
|
-
65
|
816
|
-
66
|
817
|
-
67</pre>
|
818
|
-
</td>
|
819
|
-
<td>
|
820
|
-
<pre class="code"><span class="info file"># File 'lib/stub_requests/service.rb', line 65</span>
|
821
|
-
|
822
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_endpoints?'>endpoints?</span>
|
823
|
-
<span class='id identifier rubyid_endpoint_registry'>endpoint_registry</span><span class='period'>.</span><span class='id identifier rubyid_any?'>any?</span>
|
824
|
-
<span class='kw'>end</span></pre>
|
825
|
-
</td>
|
826
|
-
</tr>
|
827
|
-
</table>
|
828
|
-
</div>
|
829
|
-
|
830
|
-
<div class="method_details ">
|
831
|
-
<h3 class="signature " id="get_endpoint-instance_method">
|
832
|
-
|
833
|
-
#<strong>get_endpoint</strong>(endpoint_id) ⇒ <tt><span class='object_link'><a href="Endpoint.html" title="StubRequests::Endpoint (class)">Endpoint</a></span></tt><sup>?</sup>
|
834
|
-
|
835
|
-
|
836
|
-
|
837
|
-
|
838
|
-
|
839
|
-
</h3><div class="docstring">
|
840
|
-
<div class="discussion">
|
841
|
-
<p>Gets an endpoint from the <span class='object_link'><a href="#endpoint_registry-instance_method" title="StubRequests::Service#endpoint_registry (method)">#endpoint_registry</a></span> collection</p>
|
842
|
-
|
843
|
-
|
844
|
-
</div>
|
845
|
-
</div>
|
846
|
-
<div class="tags">
|
847
|
-
<p class="tag_title">Parameters:</p>
|
848
|
-
<ul class="param">
|
849
|
-
|
850
|
-
<li>
|
851
|
-
|
852
|
-
<span class='name'>endpoint_id</span>
|
853
|
-
|
854
|
-
|
855
|
-
<span class='type'>(<tt>Symbol</tt>)</span>
|
856
|
-
|
857
|
-
|
858
|
-
|
859
|
-
—
|
860
|
-
<div class='inline'><p>the id of the endpoint</p>
|
861
|
-
</div>
|
862
|
-
|
863
|
-
</li>
|
864
|
-
|
865
|
-
</ul>
|
866
|
-
|
867
|
-
<p class="tag_title">Returns:</p>
|
868
|
-
<ul class="return">
|
869
|
-
|
870
|
-
<li>
|
871
|
-
|
872
|
-
|
873
|
-
<span class='type'>(<tt><span class='object_link'><a href="Endpoint.html" title="StubRequests::Endpoint (class)">Endpoint</a></span></tt>, <tt>nil</tt>)</span>
|
874
|
-
|
875
|
-
|
876
|
-
|
877
|
-
</li>
|
878
|
-
|
879
|
-
</ul>
|
880
|
-
<p class="tag_title">Since:</p>
|
881
|
-
<ul class="since">
|
882
|
-
|
883
|
-
<li>
|
884
|
-
|
885
|
-
|
886
|
-
|
887
|
-
|
888
|
-
|
889
|
-
<div class='inline'><p>0.1.0</p>
|
890
|
-
</div>
|
891
|
-
|
892
|
-
</li>
|
893
|
-
|
894
|
-
</ul>
|
895
|
-
|
896
|
-
</div><table class="source_code">
|
897
|
-
<tr>
|
898
|
-
<td>
|
899
|
-
<pre class="lines">
|
900
|
-
|
901
|
-
|
902
|
-
89
|
903
|
-
90
|
904
|
-
91</pre>
|
905
|
-
</td>
|
906
|
-
<td>
|
907
|
-
<pre class="code"><span class="info file"># File 'lib/stub_requests/service.rb', line 89</span>
|
908
|
-
|
909
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_get_endpoint'>get_endpoint</span><span class='lparen'>(</span><span class='id identifier rubyid_endpoint_id'>endpoint_id</span><span class='rparen'>)</span>
|
910
|
-
<span class='id identifier rubyid_endpoint_registry'>endpoint_registry</span><span class='period'>.</span><span class='id identifier rubyid_get'>get</span><span class='lparen'>(</span><span class='id identifier rubyid_endpoint_id'>endpoint_id</span><span class='rparen'>)</span>
|
911
|
-
<span class='kw'>end</span></pre>
|
912
|
-
</td>
|
913
|
-
</tr>
|
914
|
-
</table>
|
915
|
-
</div>
|
916
|
-
|
917
|
-
<div class="method_details ">
|
918
|
-
<h3 class="signature " id="get_endpoint!-instance_method">
|
919
|
-
|
920
|
-
#<strong>get_endpoint!</strong>(endpoint_id) ⇒ <tt><span class='object_link'><a href="Endpoint.html" title="StubRequests::Endpoint (class)">Endpoint</a></span></tt>
|
921
|
-
|
922
|
-
|
923
|
-
|
924
|
-
|
925
|
-
|
926
|
-
</h3><div class="docstring">
|
927
|
-
<div class="discussion">
|
928
|
-
<p>Gets an endpoint from the <span class='object_link'><a href="#endpoint_registry-instance_method" title="StubRequests::Service#endpoint_registry (method)">#endpoint_registry</a></span> collection</p>
|
929
|
-
|
930
|
-
|
931
|
-
</div>
|
932
|
-
</div>
|
933
|
-
<div class="tags">
|
934
|
-
<p class="tag_title">Parameters:</p>
|
935
|
-
<ul class="param">
|
936
|
-
|
937
|
-
<li>
|
938
|
-
|
939
|
-
<span class='name'>endpoint_id</span>
|
940
|
-
|
941
|
-
|
942
|
-
<span class='type'>(<tt>Symbol</tt>)</span>
|
943
|
-
|
944
|
-
|
945
|
-
|
946
|
-
—
|
947
|
-
<div class='inline'><p>the id of the endpoint</p>
|
948
|
-
</div>
|
949
|
-
|
950
|
-
</li>
|
951
|
-
|
952
|
-
</ul>
|
953
|
-
|
954
|
-
<p class="tag_title">Returns:</p>
|
955
|
-
<ul class="return">
|
956
|
-
|
957
|
-
<li>
|
958
|
-
|
959
|
-
|
960
|
-
<span class='type'>(<tt><span class='object_link'><a href="Endpoint.html" title="StubRequests::Endpoint (class)">Endpoint</a></span></tt>)</span>
|
961
|
-
|
962
|
-
|
963
|
-
|
964
|
-
</li>
|
965
|
-
|
966
|
-
</ul>
|
967
|
-
<p class="tag_title">Raises:</p>
|
968
|
-
<ul class="raise">
|
969
|
-
|
970
|
-
<li>
|
971
|
-
|
972
|
-
|
973
|
-
<span class='type'>(<tt><span class='object_link'><a href="EndpointNotFound.html" title="StubRequests::EndpointNotFound (class)">EndpointNotFound</a></span></tt>)</span>
|
974
|
-
|
975
|
-
|
976
|
-
|
977
|
-
—
|
978
|
-
<div class='inline'><p>when the endpoint couldn't be found</p>
|
979
|
-
</div>
|
980
|
-
|
981
|
-
</li>
|
982
|
-
|
983
|
-
</ul>
|
984
|
-
<p class="tag_title">Since:</p>
|
985
|
-
<ul class="since">
|
986
|
-
|
987
|
-
<li>
|
988
|
-
|
989
|
-
|
990
|
-
|
991
|
-
|
992
|
-
|
993
|
-
<div class='inline'><p>0.1.0</p>
|
994
|
-
</div>
|
995
|
-
|
996
|
-
</li>
|
997
|
-
|
998
|
-
</ul>
|
999
|
-
|
1000
|
-
</div><table class="source_code">
|
1001
|
-
<tr>
|
1002
|
-
<td>
|
1003
|
-
<pre class="lines">
|
1004
|
-
|
1005
|
-
|
1006
|
-
78
|
1007
|
-
79
|
1008
|
-
80</pre>
|
1009
|
-
</td>
|
1010
|
-
<td>
|
1011
|
-
<pre class="code"><span class="info file"># File 'lib/stub_requests/service.rb', line 78</span>
|
1012
|
-
|
1013
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_get_endpoint!'>get_endpoint!</span><span class='lparen'>(</span><span class='id identifier rubyid_endpoint_id'>endpoint_id</span><span class='rparen'>)</span>
|
1014
|
-
<span class='id identifier rubyid_endpoint_registry'>endpoint_registry</span><span class='period'>.</span><span class='id identifier rubyid_get!'>get!</span><span class='lparen'>(</span><span class='id identifier rubyid_endpoint_id'>endpoint_id</span><span class='rparen'>)</span>
|
1015
|
-
<span class='kw'>end</span></pre>
|
1016
|
-
</td>
|
1017
|
-
</tr>
|
1018
|
-
</table>
|
1019
|
-
</div>
|
1020
|
-
|
1021
|
-
<div class="method_details ">
|
1022
|
-
<h3 class="signature " id="hash-instance_method">
|
1023
|
-
|
1024
|
-
#<strong>hash</strong> ⇒ <tt><span class='object_link'><a href="../Object.html" title="Object (class)">Object</a></span></tt>
|
1025
|
-
|
1026
|
-
|
1027
|
-
|
1028
|
-
|
1029
|
-
|
1030
|
-
</h3><div class="docstring">
|
1031
|
-
<div class="discussion">
|
1032
|
-
|
1033
|
-
|
1034
|
-
</div>
|
1035
|
-
</div>
|
1036
|
-
<div class="tags">
|
1037
|
-
|
1038
|
-
<p class="tag_title">Since:</p>
|
1039
|
-
<ul class="since">
|
1040
|
-
|
1041
|
-
<li>
|
1042
|
-
|
1043
|
-
|
1044
|
-
|
1045
|
-
|
1046
|
-
|
1047
|
-
<div class='inline'><p>0.1.0</p>
|
1048
|
-
</div>
|
1049
|
-
|
1050
|
-
</li>
|
1051
|
-
|
1052
|
-
</ul>
|
1053
|
-
|
1054
|
-
</div><table class="source_code">
|
1055
|
-
<tr>
|
1056
|
-
<td>
|
1057
|
-
<pre class="lines">
|
1058
|
-
|
1059
|
-
|
1060
|
-
112
|
1061
|
-
113
|
1062
|
-
114</pre>
|
1063
|
-
</td>
|
1064
|
-
<td>
|
1065
|
-
<pre class="code"><span class="info file"># File 'lib/stub_requests/service.rb', line 112</span>
|
1066
|
-
|
1067
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_hash'>hash</span>
|
1068
|
-
<span class='lbracket'>[</span><span class='id identifier rubyid_id'>id</span><span class='comma'>,</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_hash'>hash</span>
|
1069
|
-
<span class='kw'>end</span></pre>
|
1070
|
-
</td>
|
1071
|
-
</tr>
|
1072
|
-
</table>
|
1073
|
-
</div>
|
1074
|
-
|
1075
|
-
<div class="method_details ">
|
1076
|
-
<h3 class="signature " id="register_endpoint-instance_method">
|
1077
|
-
|
1078
|
-
#<strong>register_endpoint</strong>(endpoint_id, verb, uri_template, default_options = {}) ⇒ <tt><span class='object_link'><a href="Endpoint.html" title="StubRequests::Endpoint (class)">Endpoint</a></span></tt>
|
1079
|
-
|
1080
|
-
|
1081
|
-
|
1082
|
-
|
1083
|
-
|
1084
|
-
</h3><div class="docstring">
|
1085
|
-
<div class="discussion">
|
1086
|
-
<p>Registers a new endpoint or updates an existing one</p>
|
1087
|
-
|
1088
|
-
<p>:reek:LongParameterList { max_params: 5 }</p>
|
1089
|
-
|
1090
|
-
|
1091
|
-
</div>
|
1092
|
-
</div>
|
1093
|
-
<div class="tags">
|
1094
|
-
<p class="tag_title">Parameters:</p>
|
1095
|
-
<ul class="param">
|
1096
|
-
|
1097
|
-
<li>
|
1098
|
-
|
1099
|
-
<span class='name'>endpoint_id</span>
|
1100
|
-
|
1101
|
-
|
1102
|
-
<span class='type'>(<tt>Symbol</tt>)</span>
|
1103
|
-
|
1104
|
-
|
1105
|
-
|
1106
|
-
—
|
1107
|
-
<div class='inline'><p>the id of this Endpoint</p>
|
1108
|
-
</div>
|
1109
|
-
|
1110
|
-
</li>
|
1111
|
-
|
1112
|
-
<li>
|
1113
|
-
|
1114
|
-
<span class='name'>verb</span>
|
1115
|
-
|
1116
|
-
|
1117
|
-
<span class='type'>(<tt>Symbol</tt>)</span>
|
1118
|
-
|
1119
|
-
|
1120
|
-
|
1121
|
-
—
|
1122
|
-
<div class='inline'><p>a HTTP verb</p>
|
1123
|
-
</div>
|
1124
|
-
|
1125
|
-
</li>
|
1126
|
-
|
1127
|
-
<li>
|
1128
|
-
|
1129
|
-
<span class='name'>uri_template</span>
|
1130
|
-
|
1131
|
-
|
1132
|
-
<span class='type'>(<tt><span class='object_link'><a href="../String.html" title="String (class)">String</a></span></tt>)</span>
|
1133
|
-
|
1134
|
-
|
1135
|
-
|
1136
|
-
—
|
1137
|
-
<div class='inline'><p>the URI to reach the endpoint</p>
|
1138
|
-
</div>
|
1139
|
-
|
1140
|
-
</li>
|
1141
|
-
|
1142
|
-
<li>
|
1143
|
-
|
1144
|
-
<span class='name'>default_options</span>
|
1145
|
-
|
1146
|
-
|
1147
|
-
<span class='type'>(<tt>optional</tt>, <tt><span class='object_link'><a href="../Hash.html" title="Hash (class)">Hash</a></span><Symbol></tt>)</span>
|
1148
|
-
|
1149
|
-
|
1150
|
-
<em class="default">(defaults to: <tt>{}</tt>)</em>
|
1151
|
-
|
1152
|
-
|
1153
|
-
—
|
1154
|
-
<div class='inline'><p>default options</p>
|
1155
|
-
</div>
|
1156
|
-
|
1157
|
-
</li>
|
1158
|
-
|
1159
|
-
</ul>
|
1160
|
-
|
1161
|
-
<p class="tag_title">Returns:</p>
|
1162
|
-
<ul class="return">
|
1163
|
-
|
1164
|
-
<li>
|
1165
|
-
|
1166
|
-
|
1167
|
-
<span class='type'>(<tt><span class='object_link'><a href="Endpoint.html" title="StubRequests::Endpoint (class)">Endpoint</a></span></tt>)</span>
|
1168
|
-
|
1169
|
-
|
1170
|
-
|
1171
|
-
—
|
1172
|
-
<div class='inline'><p>either the new endpoint or the updated one</p>
|
1173
|
-
</div>
|
1174
|
-
|
1175
|
-
</li>
|
1176
|
-
|
1177
|
-
</ul>
|
1178
|
-
<p class="tag_title">Since:</p>
|
1179
|
-
<ul class="since">
|
1180
|
-
|
1181
|
-
<li>
|
1182
|
-
|
1183
|
-
|
1184
|
-
|
1185
|
-
|
1186
|
-
|
1187
|
-
<div class='inline'><p>0.1.0</p>
|
1188
|
-
</div>
|
1189
|
-
|
1190
|
-
</li>
|
1191
|
-
|
1192
|
-
</ul>
|
1193
|
-
|
1194
|
-
</div><table class="source_code">
|
1195
|
-
<tr>
|
1196
|
-
<td>
|
1197
|
-
<pre class="lines">
|
1198
|
-
|
1199
|
-
|
1200
|
-
56
|
1201
|
-
57
|
1202
|
-
58</pre>
|
1203
|
-
</td>
|
1204
|
-
<td>
|
1205
|
-
<pre class="code"><span class="info file"># File 'lib/stub_requests/service.rb', line 56</span>
|
1206
|
-
|
1207
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_register_endpoint'>register_endpoint</span><span class='lparen'>(</span><span class='id identifier rubyid_endpoint_id'>endpoint_id</span><span class='comma'>,</span> <span class='id identifier rubyid_verb'>verb</span><span class='comma'>,</span> <span class='id identifier rubyid_uri_template'>uri_template</span><span class='comma'>,</span> <span class='id identifier rubyid_default_options'>default_options</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
1208
|
-
<span class='id identifier rubyid_endpoint_registry'>endpoint_registry</span><span class='period'>.</span><span class='id identifier rubyid_register'>register</span><span class='lparen'>(</span><span class='id identifier rubyid_endpoint_id'>endpoint_id</span><span class='comma'>,</span> <span class='id identifier rubyid_verb'>verb</span><span class='comma'>,</span> <span class='id identifier rubyid_uri_template'>uri_template</span><span class='comma'>,</span> <span class='id identifier rubyid_default_options'>default_options</span><span class='rparen'>)</span>
|
1209
|
-
<span class='kw'>end</span></pre>
|
1210
|
-
</td>
|
1211
|
-
</tr>
|
1212
|
-
</table>
|
1213
|
-
</div>
|
1214
|
-
|
1215
|
-
<div class="method_details ">
|
1216
|
-
<h3 class="signature " id="to_s-instance_method">
|
1217
|
-
|
1218
|
-
#<strong>to_s</strong> ⇒ <tt><span class='object_link'><a href="../String.html" title="String (class)">String</a></span></tt>
|
1219
|
-
|
1220
|
-
|
1221
|
-
|
1222
|
-
|
1223
|
-
|
1224
|
-
</h3><div class="docstring">
|
1225
|
-
<div class="discussion">
|
1226
|
-
<p>Returns a nicely formatted string with this service</p>
|
1227
|
-
|
1228
|
-
|
1229
|
-
</div>
|
1230
|
-
</div>
|
1231
|
-
<div class="tags">
|
1232
|
-
|
1233
|
-
<p class="tag_title">Returns:</p>
|
1234
|
-
<ul class="return">
|
1235
|
-
|
1236
|
-
<li>
|
1237
|
-
|
1238
|
-
|
1239
|
-
<span class='type'>(<tt><span class='object_link'><a href="../String.html" title="String (class)">String</a></span></tt>)</span>
|
1240
|
-
|
1241
|
-
|
1242
|
-
|
1243
|
-
</li>
|
1244
|
-
|
1245
|
-
</ul>
|
1246
|
-
<p class="tag_title">Since:</p>
|
1247
|
-
<ul class="since">
|
1248
|
-
|
1249
|
-
<li>
|
1250
|
-
|
1251
|
-
|
1252
|
-
|
1253
|
-
|
1254
|
-
|
1255
|
-
<div class='inline'><p>0.1.0</p>
|
1256
|
-
</div>
|
1257
|
-
|
1258
|
-
</li>
|
1259
|
-
|
1260
|
-
</ul>
|
1261
|
-
|
1262
|
-
</div><table class="source_code">
|
1263
|
-
<tr>
|
1264
|
-
<td>
|
1265
|
-
<pre class="lines">
|
1266
|
-
|
1267
|
-
|
1268
|
-
98
|
1269
|
-
99
|
1270
|
-
100
|
1271
|
-
101
|
1272
|
-
102
|
1273
|
-
103
|
1274
|
-
104
|
1275
|
-
105
|
1276
|
-
106</pre>
|
1277
|
-
</td>
|
1278
|
-
<td>
|
1279
|
-
<pre class="code"><span class="info file"># File 'lib/stub_requests/service.rb', line 98</span>
|
1280
|
-
|
1281
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_to_s'>to_s</span>
|
1282
|
-
<span class='lbracket'>[</span>
|
1283
|
-
<span class='op'>+</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>#<</span><span class='embexpr_beg'>#{</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='comma'>,</span>
|
1284
|
-
<span class='op'>+</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'> id=</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_id'>id</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='comma'>,</span>
|
1285
|
-
<span class='op'>+</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'> uri=</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_uri'>uri</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='comma'>,</span>
|
1286
|
-
<span class='op'>+</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'> endpoints=</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_endpoint_registry'>endpoint_registry</span><span class='period'>.</span><span class='id identifier rubyid_endpoints_string'>endpoints_string</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='comma'>,</span>
|
1287
|
-
<span class='op'>+</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>></span><span class='tstring_end'>"</span></span><span class='comma'>,</span>
|
1288
|
-
<span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
1289
|
-
<span class='kw'>end</span></pre>
|
1290
|
-
</td>
|
1291
|
-
</tr>
|
1292
|
-
</table>
|
1293
|
-
</div>
|
1294
|
-
|
1295
|
-
</div>
|
1296
|
-
|
1297
|
-
</div>
|
1298
|
-
|
1299
|
-
<div id="footer">
|
1300
|
-
Generated on Fri Feb 1 19:57:30 2019 by
|
1301
|
-
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
1302
|
-
0.9.18 (ruby-2.5.3).
|
1303
|
-
</div>
|
1304
|
-
|
1305
|
-
</div>
|
1306
|
-
</body>
|
1307
|
-
</html>
|