enhanced_errors 2.0.1 → 2.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -85,6 +85,11 @@
85
85
 
86
86
 
87
87
 
88
+ <dl>
89
+ <dt>Extended by:</dt>
90
+ <dd><span class='object_link'><a href="Enhanced.html" title="Enhanced (module)">Enhanced</a></span></dd>
91
+ </dl>
92
+
88
93
 
89
94
 
90
95
 
@@ -99,18 +104,7 @@
99
104
 
100
105
  </div>
101
106
 
102
- <h2>Overview</h2><div class="docstring">
103
- <div class="discussion">
104
-
105
- <p>The EnhancedErrors class provides mechanisms to enhance exception handling by capturing additional context such as binding information, variables, and method arguments when exceptions are raised. It offers customization options for formatting and filtering captured data.</p>
106
-
107
-
108
- </div>
109
- </div>
110
- <div class="tags">
111
-
112
107
 
113
- </div>
114
108
 
115
109
  <h2>
116
110
  Constant Summary
@@ -120,126 +114,65 @@
120
114
  <dl class="constants">
121
115
 
122
116
  <dt id="GEMS_REGEX-constant" class="">GEMS_REGEX =
123
- <div class="docstring">
124
- <div class="discussion">
125
-
126
- <p>Regular expression to identify gem paths.</p>
127
-
128
-
129
- </div>
130
- </div>
131
- <div class="tags">
132
-
133
- <p class="tag_title">Returns:</p>
134
- <ul class="return">
135
-
136
- <li>
137
-
138
-
139
- <span class='type'>(<tt>Regexp</tt>)</span>
140
-
141
-
142
-
143
- </li>
144
-
145
- </ul>
146
-
147
- </div>
117
+
148
118
  </dt>
149
119
  <dd><pre class="code"><span class='tstring'><span class='regexp_beg'>%r{</span><span class='tstring_content'>[\/\\]gems[\/\\]</span><span class='regexp_end'>}</span></span></pre></dd>
150
120
 
151
121
  <dt id="DEFAULT_MAX_LENGTH-constant" class="">DEFAULT_MAX_LENGTH =
122
+
123
+ </dt>
124
+ <dd><pre class="code"><span class='int'>3000</span></pre></dd>
125
+
126
+ <dt id="MAX_BINDING_INFOS-constant" class="">MAX_BINDING_INFOS =
152
127
  <div class="docstring">
153
128
  <div class="discussion">
154
129
 
155
- <p>The default maximum length for formatted exception messages.</p>
130
+ <p>Maximum binding infos we will track per-exception instance. This is intended as an extra safety rail, not a normal scenario.</p>
156
131
 
157
132
 
158
133
  </div>
159
134
  </div>
160
135
  <div class="tags">
161
136
 
162
- <p class="tag_title">Returns:</p>
163
- <ul class="return">
164
-
165
- <li>
166
-
167
-
168
- <span class='type'>(<tt>Integer</tt>)</span>
169
-
170
-
171
-
172
- </li>
173
-
174
- </ul>
175
137
 
176
138
  </div>
177
139
  </dt>
178
- <dd><pre class="code"><span class='int'>2500</span></pre></dd>
140
+ <dd><pre class="code"><span class='int'>10</span></pre></dd>
179
141
 
180
142
  <dt id="RSPEC_SKIP_LIST-constant" class="">RSPEC_SKIP_LIST =
181
143
  <div class="docstring">
182
144
  <div class="discussion">
183
145
 
184
- <p>A set of RSpec-specific instance variables to skip.</p>
146
+ <p>Add @__memoized and @__inspect_output to the skip list so they don’t appear in output</p>
185
147
 
186
148
 
187
149
  </div>
188
150
  </div>
189
151
  <div class="tags">
190
152
 
191
- <p class="tag_title">Returns:</p>
192
- <ul class="return">
193
-
194
- <li>
195
-
196
-
197
- <span class='type'>(<tt>Set&lt;Symbol&gt;</tt>)</span>
198
-
199
-
200
-
201
- </li>
202
-
203
- </ul>
204
153
 
205
154
  </div>
206
155
  </dt>
207
156
  <dd><pre class="code"><span class='const'>Set</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='lbracket'>[</span>
157
+ <span class='symbol'>:@assertions</span><span class='comma'>,</span>
158
+ <span class='symbol'>:@integration_session</span><span class='comma'>,</span>
159
+ <span class='symbol'>:@example</span><span class='comma'>,</span>
208
160
  <span class='symbol'>:@fixture_cache</span><span class='comma'>,</span>
209
161
  <span class='symbol'>:@fixture_cache_key</span><span class='comma'>,</span>
162
+ <span class='symbol'>:@fixture_connections</span><span class='comma'>,</span>
210
163
  <span class='symbol'>:@fixture_connection_pools</span><span class='comma'>,</span>
164
+ <span class='symbol'>:@loaded_fixtures</span><span class='comma'>,</span>
211
165
  <span class='symbol'>:@connection_subscriber</span><span class='comma'>,</span>
212
166
  <span class='symbol'>:@saved_pool_configs</span><span class='comma'>,</span>
213
- <span class='symbol'>:@loaded_fixtures</span><span class='comma'>,</span>
167
+ <span class='symbol'>:@assertion_instance</span><span class='comma'>,</span>
168
+ <span class='symbol'>:@legacy_saved_pool_configs</span><span class='comma'>,</span>
214
169
  <span class='symbol'>:@matcher_definitions</span><span class='comma'>,</span>
170
+ <span class='symbol'>:@__memoized</span><span class='comma'>,</span>
171
+ <span class='symbol'>:@__inspect_output</span>
215
172
  <span class='rbracket'>]</span><span class='rparen'>)</span></pre></dd>
216
173
 
217
174
  <dt id="RAILS_SKIP_LIST-constant" class="">RAILS_SKIP_LIST =
218
- <div class="docstring">
219
- <div class="discussion">
220
-
221
- <p>A set of Rails-specific instance variables to skip.</p>
222
-
223
-
224
- </div>
225
- </div>
226
- <div class="tags">
227
-
228
- <p class="tag_title">Returns:</p>
229
- <ul class="return">
230
-
231
- <li>
232
-
233
-
234
- <span class='type'>(<tt>Set&lt;Symbol&gt;</tt>)</span>
235
-
236
-
237
-
238
- </li>
239
-
240
- </ul>
241
-
242
- </div>
175
+
243
176
  </dt>
244
177
  <dd><pre class="code"><span class='const'>Set</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='lbracket'>[</span>
245
178
  <span class='symbol'>:@new_record</span><span class='comma'>,</span>
@@ -247,14 +180,22 @@
247
180
  <span class='symbol'>:@association_cache</span><span class='comma'>,</span>
248
181
  <span class='symbol'>:@readonly</span><span class='comma'>,</span>
249
182
  <span class='symbol'>:@previously_new_record</span><span class='comma'>,</span>
250
- <span class='symbol'>:@destroyed</span><span class='comma'>,</span>
183
+ <span class='symbol'>:@routes</span><span class='comma'>,</span> <span class='comment'># usually just shows #&lt;ActionDispatch::Routing::RouteSet:0x000000016087d708&gt;
184
+ </span> <span class='symbol'>:@destroyed</span><span class='comma'>,</span>
251
185
  <span class='symbol'>:@marked_for_destruction</span><span class='comma'>,</span>
252
186
  <span class='symbol'>:@destroyed_by_association</span><span class='comma'>,</span>
253
187
  <span class='symbol'>:@primary_key</span><span class='comma'>,</span>
254
188
  <span class='symbol'>:@strict_loading</span><span class='comma'>,</span>
189
+ <span class='symbol'>:@assertion_instance</span><span class='comma'>,</span>
255
190
  <span class='symbol'>:@strict_loading_mode</span><span class='comma'>,</span>
256
191
  <span class='symbol'>:@mutations_before_last_save</span><span class='comma'>,</span>
257
- <span class='symbol'>:@mutations_from_database</span>
192
+ <span class='symbol'>:@mutations_from_database</span><span class='comma'>,</span>
193
+ <span class='symbol'>:@relation_delegate_cache</span><span class='comma'>,</span>
194
+ <span class='symbol'>:@predicate_builder</span><span class='comma'>,</span>
195
+ <span class='symbol'>:@generated_relation_method</span><span class='comma'>,</span>
196
+ <span class='symbol'>:@find_by_statement_cache</span><span class='comma'>,</span>
197
+ <span class='symbol'>:@arel_table</span><span class='comma'>,</span>
198
+ <span class='symbol'>:@response_klass</span><span class='comma'>,</span>
258
199
  <span class='rbracket'>]</span><span class='rparen'>)</span></pre></dd>
259
200
 
260
201
  </dl>
@@ -269,7 +210,34 @@
269
210
  <li class="public ">
270
211
  <span class="summary_signature">
271
212
 
272
- <a href="#capture_let_variables-class_method" title="capture_let_variables (class method)">.<strong>capture_let_variables</strong>(value = nil) &#x21d2; Boolean </a>
213
+ <a href="#capture_rescue-class_method" title="capture_rescue (class method)">.<strong>capture_rescue</strong>(value = nil) &#x21d2; Object </a>
214
+
215
+
216
+
217
+ </span>
218
+
219
+
220
+
221
+
222
+
223
+
224
+
225
+
226
+
227
+
228
+
229
+
230
+ <span class="summary_desc"><div class='inline'>
231
+ <p>Returns the value of attribute capture_rescue.</p>
232
+ </div></span>
233
+
234
+ </li>
235
+
236
+
237
+ <li class="public ">
238
+ <span class="summary_signature">
239
+
240
+ <a href="#config_block-class_method" title="config_block (class method)">.<strong>config_block</strong> &#x21d2; Object </a>
273
241
 
274
242
 
275
243
 
@@ -287,7 +255,7 @@
287
255
 
288
256
 
289
257
  <span class="summary_desc"><div class='inline'>
290
- <p>Gets or sets whether to capture RSpec ‘let` variables.</p>
258
+ <p>Returns the value of attribute config_block.</p>
291
259
  </div></span>
292
260
 
293
261
  </li>
@@ -296,7 +264,7 @@
296
264
  <li class="public ">
297
265
  <span class="summary_signature">
298
266
 
299
- <a href="#config_block-class_method" title="config_block (class method)">.<strong>config_block</strong> &#x21d2; Proc<sup>?</sup> </a>
267
+ <a href="#eligible_for_capture-class_method" title="eligible_for_capture (class method)">.<strong>eligible_for_capture</strong>(&amp;block) &#x21d2; Object </a>
300
268
 
301
269
 
302
270
 
@@ -314,7 +282,7 @@
314
282
 
315
283
 
316
284
  <span class="summary_desc"><div class='inline'>
317
- <p>The configuration block provided during enhancement.</p>
285
+ <p>Returns the value of attribute eligible_for_capture.</p>
318
286
  </div></span>
319
287
 
320
288
  </li>
@@ -323,7 +291,7 @@
323
291
  <li class="public ">
324
292
  <span class="summary_signature">
325
293
 
326
- <a href="#eligible_for_capture-class_method" title="eligible_for_capture (class method)">.<strong>eligible_for_capture</strong> {|exception| ... } &#x21d2; Proc </a>
294
+ <a href="#enabled-class_method" title="enabled (class method)">.<strong>enabled</strong> &#x21d2; Object </a>
327
295
 
328
296
 
329
297
 
@@ -341,7 +309,7 @@
341
309
 
342
310
 
343
311
  <span class="summary_desc"><div class='inline'>
344
- <p>Sets or retrieves the eligibility criteria for capturing exceptions.</p>
312
+ <p>Returns the value of attribute enabled.</p>
345
313
  </div></span>
346
314
 
347
315
  </li>
@@ -350,7 +318,7 @@
350
318
  <li class="public ">
351
319
  <span class="summary_signature">
352
320
 
353
- <a href="#enabled-class_method" title="enabled (class method)">.<strong>enabled</strong> &#x21d2; Boolean </a>
321
+ <a href="#max_length-class_method" title="max_length (class method)">.<strong>max_length</strong>(value = nil) &#x21d2; Object </a>
354
322
 
355
323
 
356
324
 
@@ -368,7 +336,7 @@
368
336
 
369
337
 
370
338
  <span class="summary_desc"><div class='inline'>
371
- <p>Indicates whether EnhancedErrors is enabled.</p>
339
+ <p>Returns the value of attribute max_length.</p>
372
340
  </div></span>
373
341
 
374
342
  </li>
@@ -377,7 +345,7 @@
377
345
  <li class="public ">
378
346
  <span class="summary_signature">
379
347
 
380
- <a href="#max_length-class_method" title="max_length (class method)">.<strong>max_length</strong>(value = nil) &#x21d2; Integer </a>
348
+ <a href="#on_capture_hook-class_method" title="on_capture_hook (class method)">.<strong>on_capture_hook</strong> &#x21d2; Object </a>
381
349
 
382
350
 
383
351
 
@@ -395,7 +363,7 @@
395
363
 
396
364
 
397
365
  <span class="summary_desc"><div class='inline'>
398
- <p>Gets or sets the maximum length for the formatted exception message.</p>
366
+ <p>Returns the value of attribute on_capture_hook.</p>
399
367
  </div></span>
400
368
 
401
369
  </li>
@@ -404,7 +372,7 @@
404
372
  <li class="public ">
405
373
  <span class="summary_signature">
406
374
 
407
- <a href="#on_capture_hook-class_method" title="on_capture_hook (class method)">.<strong>on_capture_hook</strong> &#x21d2; Proc<sup>?</sup> </a>
375
+ <a href="#override_messages-class_method" title="override_messages (class method)">.<strong>override_messages</strong> &#x21d2; Object </a>
408
376
 
409
377
 
410
378
 
@@ -422,7 +390,7 @@
422
390
 
423
391
 
424
392
  <span class="summary_desc"><div class='inline'>
425
- <p>Hook to modify binding information upon capture.</p>
393
+ <p>Returns the value of attribute override_messages.</p>
426
394
  </div></span>
427
395
 
428
396
  </li>
@@ -431,7 +399,7 @@
431
399
  <li class="public ">
432
400
  <span class="summary_signature">
433
401
 
434
- <a href="#skip_list-class_method" title="skip_list (class method)">.<strong>skip_list</strong> &#x21d2; Set&lt;Symbol&gt; </a>
402
+ <a href="#skip_list-class_method" title="skip_list (class method)">.<strong>skip_list</strong> &#x21d2; Object </a>
435
403
 
436
404
 
437
405
 
@@ -449,7 +417,7 @@
449
417
 
450
418
 
451
419
  <span class="summary_desc"><div class='inline'>
452
- <p>Retrieves the current skip list, initializing it with default values if not already set.</p>
420
+ <p>Returns the value of attribute skip_list.</p>
453
421
  </div></span>
454
422
 
455
423
  </li>
@@ -458,7 +426,7 @@
458
426
  <li class="public ">
459
427
  <span class="summary_signature">
460
428
 
461
- <a href="#trace-class_method" title="trace (class method)">.<strong>trace</strong> &#x21d2; TracePoint<sup>?</sup> </a>
429
+ <a href="#trace-class_method" title="trace (class method)">.<strong>trace</strong> &#x21d2; Object </a>
462
430
 
463
431
 
464
432
 
@@ -476,7 +444,7 @@
476
444
 
477
445
 
478
446
  <span class="summary_desc"><div class='inline'>
479
- <p>The TracePoint object used for tracing exceptions.</p>
447
+ <p>Returns the value of attribute trace.</p>
480
448
  </div></span>
481
449
 
482
450
  </li>
@@ -498,7 +466,7 @@
498
466
  <li class="public ">
499
467
  <span class="summary_signature">
500
468
 
501
- <a href="#add_to_skip_list-class_method" title="add_to_skip_list (class method)">.<strong>add_to_skip_list</strong>(*vars) &#x21d2; Set&lt;Symbol&gt; </a>
469
+ <a href="#add_to_skip_list-class_method" title="add_to_skip_list (class method)">.<strong>add_to_skip_list</strong>(*vars) &#x21d2; Object </a>
502
470
 
503
471
 
504
472
 
@@ -512,9 +480,7 @@
512
480
 
513
481
 
514
482
 
515
- <span class="summary_desc"><div class='inline'>
516
- <p>Adds variables to the skip list to exclude them from binding information.</p>
517
- </div></span>
483
+ <span class="summary_desc"><div class='inline'></div></span>
518
484
 
519
485
  </li>
520
486
 
@@ -522,7 +488,7 @@
522
488
  <li class="public ">
523
489
  <span class="summary_signature">
524
490
 
525
- <a href="#apply_skip_list-class_method" title="apply_skip_list (class method)">.<strong>apply_skip_list</strong>(binding_info) &#x21d2; Hash </a>
491
+ <a href="#apply_skip_list-class_method" title="apply_skip_list (class method)">.<strong>apply_skip_list</strong>(binding_info) &#x21d2; Object </a>
526
492
 
527
493
 
528
494
 
@@ -536,9 +502,7 @@
536
502
 
537
503
 
538
504
 
539
- <span class="summary_desc"><div class='inline'>
540
- <p>Applies the skip list to the captured binding information, excluding specified variables.</p>
541
- </div></span>
505
+ <span class="summary_desc"><div class='inline'></div></span>
542
506
 
543
507
  </li>
544
508
 
@@ -546,7 +510,7 @@
546
510
  <li class="public ">
547
511
  <span class="summary_signature">
548
512
 
549
- <a href="#binding_info_string-class_method" title="binding_info_string (class method)">.<strong>binding_info_string</strong>(binding_info) &#x21d2; String </a>
513
+ <a href="#binding_info_string-class_method" title="binding_info_string (class method)">.<strong>binding_info_string</strong>(binding_info) &#x21d2; Object </a>
550
514
 
551
515
 
552
516
 
@@ -560,9 +524,7 @@
560
524
 
561
525
 
562
526
 
563
- <span class="summary_desc"><div class='inline'>
564
- <p>Formats a single binding information hash into a string with colorization.</p>
565
- </div></span>
527
+ <span class="summary_desc"><div class='inline'></div></span>
566
528
 
567
529
  </li>
568
530
 
@@ -570,7 +532,7 @@
570
532
  <li class="public ">
571
533
  <span class="summary_signature">
572
534
 
573
- <a href="#binding_infos_array_to_string-class_method" title="binding_infos_array_to_string (class method)">.<strong>binding_infos_array_to_string</strong>(captured_bindings, format = :terminal) &#x21d2; String </a>
535
+ <a href="#binding_infos_array_to_string-class_method" title="binding_infos_array_to_string (class method)">.<strong>binding_infos_array_to_string</strong>(captured_bindings, format = :terminal) &#x21d2; Object </a>
574
536
 
575
537
 
576
538
 
@@ -584,9 +546,7 @@
584
546
 
585
547
 
586
548
 
587
- <span class="summary_desc"><div class='inline'>
588
- <p>Converts an array of binding information hashes into a formatted string.</p>
589
- </div></span>
549
+ <span class="summary_desc"><div class='inline'></div></span>
590
550
 
591
551
  </li>
592
552
 
@@ -594,7 +554,7 @@
594
554
  <li class="public ">
595
555
  <span class="summary_signature">
596
556
 
597
- <a href="#default_skip_list-class_method" title="default_skip_list (class method)">.<strong>default_skip_list</strong> &#x21d2; Set&lt;Symbol&gt; </a>
557
+ <a href="#convert_binding_to_binding_info-class_method" title="convert_binding_to_binding_info (class method)">.<strong>convert_binding_to_binding_info</strong>(b, capture_let_variables: true) &#x21d2; Object </a>
598
558
 
599
559
 
600
560
 
@@ -608,9 +568,7 @@
608
568
 
609
569
 
610
570
 
611
- <span class="summary_desc"><div class='inline'>
612
- <p>Initializes the default skip list by merging Rails and RSpec specific variables.</p>
613
- </div></span>
571
+ <span class="summary_desc"><div class='inline'></div></span>
614
572
 
615
573
  </li>
616
574
 
@@ -618,7 +576,7 @@
618
576
  <li class="public ">
619
577
  <span class="summary_signature">
620
578
 
621
- <a href="#enhance!-class_method" title="enhance! (class method)">.<strong>enhance!</strong>(enabled: true, debug: false, capture_events: default_capture_events, **options) {|void| ... } &#x21d2; void </a>
579
+ <a href="#default_skip_list-class_method" title="default_skip_list (class method)">.<strong>default_skip_list</strong> &#x21d2; Object </a>
622
580
 
623
581
 
624
582
 
@@ -632,9 +590,7 @@
632
590
 
633
591
 
634
592
 
635
- <span class="summary_desc"><div class='inline'>
636
- <p>Enhances the exception handling by setting up tracing and configuration options.</p>
637
- </div></span>
593
+ <span class="summary_desc"><div class='inline'></div></span>
638
594
 
639
595
  </li>
640
596
 
@@ -642,7 +598,7 @@
642
598
  <li class="public ">
643
599
  <span class="summary_signature">
644
600
 
645
- <a href="#format-class_method" title="format (class method)">.<strong>format</strong>(captured_bindings = [], output_format = get_default_format_for_environment) &#x21d2; String </a>
601
+ <a href="#enhance_exceptions!-class_method" title="enhance_exceptions! (class method)">.<strong>enhance_exceptions!</strong>(enabled: true, debug: false, capture_events: nil, override_messages: false, **options, &amp;block) &#x21d2; Object </a>
646
602
 
647
603
 
648
604
 
@@ -656,9 +612,7 @@
656
612
 
657
613
 
658
614
 
659
- <span class="summary_desc"><div class='inline'>
660
- <p>Formats the captured binding information into a string based on the specified format.</p>
661
- </div></span>
615
+ <span class="summary_desc"><div class='inline'></div></span>
662
616
 
663
617
  </li>
664
618
 
@@ -666,7 +620,7 @@
666
620
  <li class="public ">
667
621
  <span class="summary_signature">
668
622
 
669
- <a href="#get_default_format_for_environment-class_method" title="get_default_format_for_environment (class method)">.<strong>get_default_format_for_environment</strong> &#x21d2; Symbol </a>
623
+ <a href="#format-class_method" title="format (class method)">.<strong>format</strong>(captured_binding_infos = [], output_format = get_default_format_for_environment) &#x21d2; Object </a>
670
624
 
671
625
 
672
626
 
@@ -680,9 +634,7 @@
680
634
 
681
635
 
682
636
 
683
- <span class="summary_desc"><div class='inline'>
684
- <p>Determines the default output format based on the current environment.</p>
685
- </div></span>
637
+ <span class="summary_desc"><div class='inline'></div></span>
686
638
 
687
639
  </li>
688
640
 
@@ -690,7 +642,7 @@
690
642
  <li class="public ">
691
643
  <span class="summary_signature">
692
644
 
693
- <a href="#on_capture-class_method" title="on_capture (class method)">.<strong>on_capture</strong> {|binding_info| ... } &#x21d2; Proc </a>
645
+ <a href="#get_default_format_for_environment-class_method" title="get_default_format_for_environment (class method)">.<strong>get_default_format_for_environment</strong> &#x21d2; Object </a>
694
646
 
695
647
 
696
648
 
@@ -704,9 +656,7 @@
704
656
 
705
657
 
706
658
 
707
- <span class="summary_desc"><div class='inline'>
708
- <p>Sets or retrieves the hook to modify binding information upon capture.</p>
709
- </div></span>
659
+ <span class="summary_desc"><div class='inline'></div></span>
710
660
 
711
661
  </li>
712
662
 
@@ -714,7 +664,7 @@
714
664
  <li class="public ">
715
665
  <span class="summary_signature">
716
666
 
717
- <a href="#on_capture=-class_method" title="on_capture= (class method)">.<strong>on_capture=</strong>(value) &#x21d2; Proc </a>
667
+ <a href="#on_capture-class_method" title="on_capture (class method)">.<strong>on_capture</strong>(&amp;block) &#x21d2; Object </a>
718
668
 
719
669
 
720
670
 
@@ -728,9 +678,7 @@
728
678
 
729
679
 
730
680
 
731
- <span class="summary_desc"><div class='inline'>
732
- <p>Sets the on_capture hook.</p>
733
- </div></span>
681
+ <span class="summary_desc"><div class='inline'></div></span>
734
682
 
735
683
  </li>
736
684
 
@@ -738,7 +686,7 @@
738
686
  <li class="public ">
739
687
  <span class="summary_signature">
740
688
 
741
- <a href="#on_format-class_method" title="on_format (class method)">.<strong>on_format</strong> {|formatted_string| ... } &#x21d2; Proc </a>
689
+ <a href="#on_capture=-class_method" title="on_capture= (class method)">.<strong>on_capture=</strong>(value) &#x21d2; Object </a>
742
690
 
743
691
 
744
692
 
@@ -752,9 +700,7 @@
752
700
 
753
701
 
754
702
 
755
- <span class="summary_desc"><div class='inline'>
756
- <p>Sets or retrieves the hook to modify formatted exception messages.</p>
757
- </div></span>
703
+ <span class="summary_desc"><div class='inline'></div></span>
758
704
 
759
705
  </li>
760
706
 
@@ -762,7 +708,7 @@
762
708
  <li class="public ">
763
709
  <span class="summary_signature">
764
710
 
765
- <a href="#on_format=-class_method" title="on_format= (class method)">.<strong>on_format=</strong>(value) &#x21d2; Proc </a>
711
+ <a href="#on_format-class_method" title="on_format (class method)">.<strong>on_format</strong>(&amp;block) &#x21d2; Object </a>
766
712
 
767
713
 
768
714
 
@@ -776,9 +722,7 @@
776
722
 
777
723
 
778
724
 
779
- <span class="summary_desc"><div class='inline'>
780
- <p>Sets the on_format hook.</p>
781
- </div></span>
725
+ <span class="summary_desc"><div class='inline'></div></span>
782
726
 
783
727
  </li>
784
728
 
@@ -786,7 +730,7 @@
786
730
  <li class="public ">
787
731
  <span class="summary_signature">
788
732
 
789
- <a href="#running_in_ci%3F-class_method" title="running_in_ci? (class method)">.<strong>running_in_ci?</strong> &#x21d2; Boolean </a>
733
+ <a href="#on_format=-class_method" title="on_format= (class method)">.<strong>on_format=</strong>(value) &#x21d2; Object </a>
790
734
 
791
735
 
792
736
 
@@ -800,9 +744,7 @@
800
744
 
801
745
 
802
746
 
803
- <span class="summary_desc"><div class='inline'>
804
- <p>Checks if the code is running in a Continuous Integration (CI) environment.</p>
805
- </div></span>
747
+ <span class="summary_desc"><div class='inline'></div></span>
806
748
 
807
749
  </li>
808
750
 
@@ -810,7 +752,7 @@
810
752
  <li class="public ">
811
753
  <span class="summary_signature">
812
754
 
813
- <a href="#validate_binding_format-class_method" title="validate_binding_format (class method)">.<strong>validate_binding_format</strong>(binding_info) &#x21d2; Hash<sup>?</sup> </a>
755
+ <a href="#override_exception_message-class_method" title="override_exception_message (class method)">.<strong>override_exception_message</strong>(exception, binding_or_bindings) &#x21d2; Object </a>
814
756
 
815
757
 
816
758
 
@@ -825,136 +767,178 @@
825
767
 
826
768
 
827
769
  <span class="summary_desc"><div class='inline'>
828
- <p>Validates the format of the captured binding information.</p>
770
+ <p>takes an exception and bindings, calculates the variables message and modifies the exceptions .message to display the variables.</p>
829
771
  </div></span>
830
772
 
831
773
  </li>
832
774
 
833
775
 
834
- </ul>
835
-
836
-
776
+ <li class="public ">
777
+ <span class="summary_signature">
778
+
779
+ <a href="#running_in_ci%3F-class_method" title="running_in_ci? (class method)">.<strong>running_in_ci?</strong> &#x21d2; Boolean </a>
780
+
837
781
 
838
- <div id="class_attr_details" class="attr_details">
839
- <h2>Class Attribute Details</h2>
840
782
 
841
-
842
- <span id="capture_let_variables=-class_method"></span>
843
- <div class="method_details first">
844
- <h3 class="signature first" id="capture_let_variables-class_method">
783
+ </span>
784
+
785
+
786
+
787
+
845
788
 
846
- .<strong>capture_let_variables</strong>(value = nil) &#x21d2; <tt>Boolean</tt>
847
789
 
848
-
849
790
 
850
791
 
851
792
 
852
- </h3><div class="docstring">
853
- <div class="discussion">
854
-
855
- <p>Gets or sets whether to capture RSpec ‘let` variables.</p>
793
+ <span class="summary_desc"><div class='inline'></div></span>
794
+
795
+ </li>
856
796
 
797
+
798
+ <li class="public ">
799
+ <span class="summary_signature">
800
+
801
+ <a href="#safe_prepend_module-class_method" title="safe_prepend_module (class method)">.<strong>safe_prepend_module</strong>(target_class, mod) &#x21d2; Object </a>
802
+
857
803
 
858
- </div>
859
- </div>
860
- <div class="tags">
861
- <p class="tag_title">Parameters:</p>
862
- <ul class="param">
804
+
805
+ </span>
806
+
807
+
808
+
863
809
 
864
- <li>
865
-
866
- <span class='name'>value</span>
867
-
868
-
869
- <span class='type'>(<tt>Boolean</tt>, <tt>nil</tt>)</span>
870
-
871
-
872
- <em class="default">(defaults to: <tt>nil</tt>)</em>
873
-
874
-
875
- &mdash;
876
- <div class='inline'>
877
- <p>The desired state. If ‘nil`, returns the current value.</p>
878
- </div>
879
-
880
- </li>
881
810
 
882
- </ul>
883
-
884
- <p class="tag_title">Returns:</p>
885
- <ul class="return">
886
811
 
887
- <li>
888
-
889
-
890
- <span class='type'>(<tt>Boolean</tt>)</span>
891
-
892
-
893
-
894
- &mdash;
895
- <div class='inline'>
896
- <p>Whether RSpec ‘let` variables are being captured.</p>
897
- </div>
898
-
899
- </li>
900
812
 
901
- </ul>
902
-
903
- </div><table class="source_code">
904
- <tr>
905
- <td>
906
- <pre class="lines">
907
813
 
814
+
815
+ <span class="summary_desc"><div class='inline'></div></span>
816
+
817
+ </li>
908
818
 
909
- 55
910
- 56
911
- 57</pre>
912
- </td>
913
- <td>
914
- <pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line 55</span>
819
+
820
+ <li class="public ">
821
+ <span class="summary_signature">
822
+
823
+ <a href="#safely_prepend_rspec_custom_failure_message-class_method" title="safely_prepend_rspec_custom_failure_message (class method)">.<strong>safely_prepend_rspec_custom_failure_message</strong> &#x21d2; Object </a>
824
+
915
825
 
916
- <span class='kw'>def</span> <span class='id identifier rubyid_capture_let_variables'>capture_let_variables</span>
917
- <span class='ivar'>@capture_let_variables</span>
918
- <span class='kw'>end</span></pre>
919
- </td>
920
- </tr>
921
- </table>
922
- </div>
923
826
 
924
-
925
- <span id="config_block=-class_method"></span>
926
- <div class="method_details ">
927
- <h3 class="signature " id="config_block-class_method">
827
+ </span>
828
+
829
+
830
+
831
+
928
832
 
929
- .<strong>config_block</strong> &#x21d2; <tt>Proc</tt><sup>?</sup>
930
833
 
931
-
932
834
 
933
835
 
934
836
 
935
- </h3><div class="docstring">
936
- <div class="discussion">
837
+ <span class="summary_desc"><div class='inline'></div></span>
838
+
839
+ </li>
840
+
841
+
842
+ <li class="public ">
843
+ <span class="summary_signature">
844
+
845
+ <a href="#start_rspec_binding_capture-class_method" title="start_rspec_binding_capture (class method)">.<strong>start_rspec_binding_capture</strong> &#x21d2; Object </a>
937
846
 
938
- <p>The configuration block provided during enhancement.</p>
939
847
 
848
+
849
+ </span>
850
+
851
+
852
+
853
+
854
+
855
+
856
+
940
857
 
941
- </div>
942
- </div>
943
- <div class="tags">
944
858
 
945
- <p class="tag_title">Returns:</p>
946
- <ul class="return">
859
+ <span class="summary_desc"><div class='inline'></div></span>
947
860
 
948
- <li>
949
-
861
+ </li>
862
+
950
863
 
951
- <span class='type'>(<tt>Proc</tt>, <tt>nil</tt>)</span>
864
+ <li class="public ">
865
+ <span class="summary_signature">
866
+
867
+ <a href="#stop_rspec_binding_capture-class_method" title="stop_rspec_binding_capture (class method)">.<strong>stop_rspec_binding_capture</strong> &#x21d2; Object </a>
868
+
869
+
870
+
871
+ </span>
872
+
873
+
874
+
875
+
876
+
877
+
878
+
879
+
880
+
881
+ <span class="summary_desc"><div class='inline'></div></span>
882
+
883
+ </li>
884
+
952
885
 
886
+ <li class="public ">
887
+ <span class="summary_signature">
888
+
889
+ <a href="#validate_binding_format-class_method" title="validate_binding_format (class method)">.<strong>validate_binding_format</strong>(binding_info) &#x21d2; Object </a>
890
+
891
+
892
+
893
+ </span>
894
+
895
+
896
+
897
+
898
+
899
+
900
+
901
+
902
+
903
+ <span class="summary_desc"><div class='inline'></div></span>
904
+
905
+ </li>
906
+
953
907
 
908
+ </ul>
909
+
910
+
911
+
912
+
913
+
914
+
915
+
916
+
917
+
918
+ <div id="class_attr_details" class="attr_details">
919
+ <h2>Class Attribute Details</h2>
920
+
954
921
 
955
- </li>
922
+ <span id="capture_rescue=-class_method"></span>
923
+ <div class="method_details first">
924
+ <h3 class="signature first" id="capture_rescue-class_method">
925
+
926
+ .<strong>capture_rescue</strong>(value = nil) &#x21d2; <tt>Object</tt>
927
+
928
+
929
+
930
+
931
+
932
+ </h3><div class="docstring">
933
+ <div class="discussion">
934
+
935
+ <p>Returns the value of attribute capture_rescue.</p>
936
+
937
+
938
+ </div>
939
+ </div>
940
+ <div class="tags">
956
941
 
957
- </ul>
958
942
 
959
943
  </div><table class="source_code">
960
944
  <tr>
@@ -962,15 +946,15 @@
962
946
  <pre class="lines">
963
947
 
964
948
 
965
- 40
966
- 41
967
- 42</pre>
949
+ 20
950
+ 21
951
+ 22</pre>
968
952
  </td>
969
953
  <td>
970
- <pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line 40</span>
954
+ <pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line 20</span>
971
955
 
972
- <span class='kw'>def</span> <span class='id identifier rubyid_config_block'>config_block</span>
973
- <span class='ivar'>@config_block</span>
956
+ <span class='kw'>def</span> <span class='id identifier rubyid_capture_rescue'>capture_rescue</span>
957
+ <span class='ivar'>@capture_rescue</span>
974
958
  <span class='kw'>end</span></pre>
975
959
  </td>
976
960
  </tr>
@@ -978,11 +962,11 @@
978
962
  </div>
979
963
 
980
964
 
981
- <span id="eligible_for_capture=-class_method"></span>
965
+ <span id="config_block=-class_method"></span>
982
966
  <div class="method_details ">
983
- <h3 class="signature " id="eligible_for_capture-class_method">
967
+ <h3 class="signature " id="config_block-class_method">
984
968
 
985
- .<strong>eligible_for_capture</strong> {|exception| ... } &#x21d2; <tt>Proc</tt>
969
+ .<strong>config_block</strong> &#x21d2; <tt>Object</tt>
986
970
 
987
971
 
988
972
 
@@ -991,51 +975,56 @@
991
975
  </h3><div class="docstring">
992
976
  <div class="discussion">
993
977
 
994
- <p>Sets or retrieves the eligibility criteria for capturing exceptions.</p>
978
+ <p>Returns the value of attribute config_block.</p>
995
979
 
996
980
 
997
981
  </div>
998
982
  </div>
999
983
  <div class="tags">
1000
984
 
1001
- <p class="tag_title">Yield Parameters:</p>
1002
- <ul class="yieldparam">
1003
-
1004
- <li>
1005
-
1006
- <span class='name'>exception</span>
1007
-
1008
-
1009
- <span class='type'>(<tt>Exception</tt>)</span>
1010
-
1011
-
1012
-
1013
- &mdash;
1014
- <div class='inline'>
1015
- <p>The exception to evaluate.</p>
985
+
986
+ </div><table class="source_code">
987
+ <tr>
988
+ <td>
989
+ <pre class="lines">
990
+
991
+
992
+ 20
993
+ 21
994
+ 22</pre>
995
+ </td>
996
+ <td>
997
+ <pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line 20</span>
998
+
999
+ <span class='kw'>def</span> <span class='id identifier rubyid_config_block'>config_block</span>
1000
+ <span class='ivar'>@config_block</span>
1001
+ <span class='kw'>end</span></pre>
1002
+ </td>
1003
+ </tr>
1004
+ </table>
1016
1005
  </div>
1006
+
1017
1007
 
1018
- </li>
1008
+ <span id="eligible_for_capture=-class_method"></span>
1009
+ <div class="method_details ">
1010
+ <h3 class="signature " id="eligible_for_capture-class_method">
1019
1011
 
1020
- </ul>
1021
- <p class="tag_title">Returns:</p>
1022
- <ul class="return">
1012
+ .<strong>eligible_for_capture</strong>(&amp;block) &#x21d2; <tt>Object</tt>
1023
1013
 
1024
- <li>
1025
-
1026
-
1027
- <span class='type'>(<tt>Proc</tt>)</span>
1028
-
1029
-
1030
-
1031
- &mdash;
1032
- <div class='inline'>
1033
- <p>The current eligibility proc.</p>
1014
+
1015
+
1016
+
1017
+
1018
+ </h3><div class="docstring">
1019
+ <div class="discussion">
1020
+
1021
+ <p>Returns the value of attribute eligible_for_capture.</p>
1022
+
1023
+
1024
+ </div>
1034
1025
  </div>
1035
-
1036
- </li>
1026
+ <div class="tags">
1037
1027
 
1038
- </ul>
1039
1028
 
1040
1029
  </div><table class="source_code">
1041
1030
  <tr>
@@ -1043,12 +1032,12 @@
1043
1032
  <pre class="lines">
1044
1033
 
1045
1034
 
1046
- 60
1047
- 61
1048
- 62</pre>
1035
+ 20
1036
+ 21
1037
+ 22</pre>
1049
1038
  </td>
1050
1039
  <td>
1051
- <pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line 60</span>
1040
+ <pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line 20</span>
1052
1041
 
1053
1042
  <span class='kw'>def</span> <span class='id identifier rubyid_eligible_for_capture'>eligible_for_capture</span>
1054
1043
  <span class='ivar'>@eligible_for_capture</span>
@@ -1063,7 +1052,7 @@
1063
1052
  <div class="method_details ">
1064
1053
  <h3 class="signature " id="enabled-class_method">
1065
1054
 
1066
- .<strong>enabled</strong> &#x21d2; <tt>Boolean</tt>
1055
+ .<strong>enabled</strong> &#x21d2; <tt>Object</tt>
1067
1056
 
1068
1057
 
1069
1058
 
@@ -1072,26 +1061,13 @@
1072
1061
  </h3><div class="docstring">
1073
1062
  <div class="discussion">
1074
1063
 
1075
- <p>Indicates whether EnhancedErrors is enabled.</p>
1064
+ <p>Returns the value of attribute enabled.</p>
1076
1065
 
1077
1066
 
1078
1067
  </div>
1079
1068
  </div>
1080
1069
  <div class="tags">
1081
1070
 
1082
- <p class="tag_title">Returns:</p>
1083
- <ul class="return">
1084
-
1085
- <li>
1086
-
1087
-
1088
- <span class='type'>(<tt>Boolean</tt>)</span>
1089
-
1090
-
1091
-
1092
- </li>
1093
-
1094
- </ul>
1095
1071
 
1096
1072
  </div><table class="source_code">
1097
1073
  <tr>
@@ -1099,12 +1075,12 @@
1099
1075
  <pre class="lines">
1100
1076
 
1101
1077
 
1102
- 30
1103
- 31
1104
- 32</pre>
1078
+ 20
1079
+ 21
1080
+ 22</pre>
1105
1081
  </td>
1106
1082
  <td>
1107
- <pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line 30</span>
1083
+ <pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line 20</span>
1108
1084
 
1109
1085
  <span class='kw'>def</span> <span class='id identifier rubyid_enabled'>enabled</span>
1110
1086
  <span class='ivar'>@enabled</span>
@@ -1119,7 +1095,7 @@
1119
1095
  <div class="method_details ">
1120
1096
  <h3 class="signature " id="max_length-class_method">
1121
1097
 
1122
- .<strong>max_length</strong>(value = nil) &#x21d2; <tt>Integer</tt>
1098
+ .<strong>max_length</strong>(value = nil) &#x21d2; <tt>Object</tt>
1123
1099
 
1124
1100
 
1125
1101
 
@@ -1128,53 +1104,13 @@
1128
1104
  </h3><div class="docstring">
1129
1105
  <div class="discussion">
1130
1106
 
1131
- <p>Gets or sets the maximum length for the formatted exception message.</p>
1107
+ <p>Returns the value of attribute max_length.</p>
1132
1108
 
1133
1109
 
1134
1110
  </div>
1135
1111
  </div>
1136
1112
  <div class="tags">
1137
- <p class="tag_title">Parameters:</p>
1138
- <ul class="param">
1139
-
1140
- <li>
1141
-
1142
- <span class='name'>value</span>
1143
-
1144
-
1145
- <span class='type'>(<tt>Integer</tt>, <tt>nil</tt>)</span>
1146
-
1147
-
1148
- <em class="default">(defaults to: <tt>nil</tt>)</em>
1149
-
1150
-
1151
- &mdash;
1152
- <div class='inline'>
1153
- <p>The desired maximum length. If ‘nil`, returns the current value.</p>
1154
- </div>
1155
-
1156
- </li>
1157
-
1158
- </ul>
1159
-
1160
- <p class="tag_title">Returns:</p>
1161
- <ul class="return">
1162
1113
 
1163
- <li>
1164
-
1165
-
1166
- <span class='type'>(<tt>Integer</tt>)</span>
1167
-
1168
-
1169
-
1170
- &mdash;
1171
- <div class='inline'>
1172
- <p>The maximum length for the formatted message.</p>
1173
- </div>
1174
-
1175
- </li>
1176
-
1177
- </ul>
1178
1114
 
1179
1115
  </div><table class="source_code">
1180
1116
  <tr>
@@ -1182,12 +1118,12 @@
1182
1118
  <pre class="lines">
1183
1119
 
1184
1120
 
1185
- 45
1186
- 46
1187
- 47</pre>
1121
+ 20
1122
+ 21
1123
+ 22</pre>
1188
1124
  </td>
1189
1125
  <td>
1190
- <pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line 45</span>
1126
+ <pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line 20</span>
1191
1127
 
1192
1128
  <span class='kw'>def</span> <span class='id identifier rubyid_max_length'>max_length</span>
1193
1129
  <span class='ivar'>@max_length</span>
@@ -1202,7 +1138,7 @@
1202
1138
  <div class="method_details ">
1203
1139
  <h3 class="signature " id="on_capture_hook-class_method">
1204
1140
 
1205
- .<strong>on_capture_hook</strong> &#x21d2; <tt>Proc</tt><sup>?</sup>
1141
+ .<strong>on_capture_hook</strong> &#x21d2; <tt>Object</tt>
1206
1142
 
1207
1143
 
1208
1144
 
@@ -1211,26 +1147,13 @@
1211
1147
  </h3><div class="docstring">
1212
1148
  <div class="discussion">
1213
1149
 
1214
- <p>Hook to modify binding information upon capture.</p>
1150
+ <p>Returns the value of attribute on_capture_hook.</p>
1215
1151
 
1216
1152
 
1217
1153
  </div>
1218
1154
  </div>
1219
1155
  <div class="tags">
1220
1156
 
1221
- <p class="tag_title">Returns:</p>
1222
- <ul class="return">
1223
-
1224
- <li>
1225
-
1226
-
1227
- <span class='type'>(<tt>Proc</tt>, <tt>nil</tt>)</span>
1228
-
1229
-
1230
-
1231
- </li>
1232
-
1233
- </ul>
1234
1157
 
1235
1158
  </div><table class="source_code">
1236
1159
  <tr>
@@ -1238,12 +1161,12 @@
1238
1161
  <pre class="lines">
1239
1162
 
1240
1163
 
1241
- 50
1242
- 51
1243
- 52</pre>
1164
+ 20
1165
+ 21
1166
+ 22</pre>
1244
1167
  </td>
1245
1168
  <td>
1246
- <pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line 50</span>
1169
+ <pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line 20</span>
1247
1170
 
1248
1171
  <span class='kw'>def</span> <span class='id identifier rubyid_on_capture_hook'>on_capture_hook</span>
1249
1172
  <span class='ivar'>@on_capture_hook</span>
@@ -1254,11 +1177,11 @@
1254
1177
  </div>
1255
1178
 
1256
1179
 
1257
- <span id="skip_list=-class_method"></span>
1180
+ <span id="override_messages=-class_method"></span>
1258
1181
  <div class="method_details ">
1259
- <h3 class="signature " id="skip_list-class_method">
1182
+ <h3 class="signature " id="override_messages-class_method">
1260
1183
 
1261
- .<strong>skip_list</strong> &#x21d2; <tt>Set&lt;Symbol&gt;</tt>
1184
+ .<strong>override_messages</strong> &#x21d2; <tt>Object</tt>
1262
1185
 
1263
1186
 
1264
1187
 
@@ -1267,31 +1190,56 @@
1267
1190
  </h3><div class="docstring">
1268
1191
  <div class="discussion">
1269
1192
 
1270
- <p>Retrieves the current skip list, initializing it with default values if not already set.</p>
1193
+ <p>Returns the value of attribute override_messages.</p>
1271
1194
 
1272
1195
 
1273
1196
  </div>
1274
1197
  </div>
1275
1198
  <div class="tags">
1276
1199
 
1277
- <p class="tag_title">Returns:</p>
1278
- <ul class="return">
1279
-
1280
- <li>
1281
-
1282
-
1283
- <span class='type'>(<tt>Set&lt;Symbol&gt;</tt>)</span>
1284
-
1285
-
1286
-
1287
- &mdash;
1288
- <div class='inline'>
1289
- <p>The current skip list.</p>
1200
+
1201
+ </div><table class="source_code">
1202
+ <tr>
1203
+ <td>
1204
+ <pre class="lines">
1205
+
1206
+
1207
+ 20
1208
+ 21
1209
+ 22</pre>
1210
+ </td>
1211
+ <td>
1212
+ <pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line 20</span>
1213
+
1214
+ <span class='kw'>def</span> <span class='id identifier rubyid_override_messages'>override_messages</span>
1215
+ <span class='ivar'>@override_messages</span>
1216
+ <span class='kw'>end</span></pre>
1217
+ </td>
1218
+ </tr>
1219
+ </table>
1290
1220
  </div>
1221
+
1291
1222
 
1292
- </li>
1223
+ <span id="skip_list=-class_method"></span>
1224
+ <div class="method_details ">
1225
+ <h3 class="signature " id="skip_list-class_method">
1226
+
1227
+ .<strong>skip_list</strong> &#x21d2; <tt>Object</tt>
1228
+
1229
+
1230
+
1231
+
1232
+
1233
+ </h3><div class="docstring">
1234
+ <div class="discussion">
1235
+
1236
+ <p>Returns the value of attribute skip_list.</p>
1237
+
1238
+
1239
+ </div>
1240
+ </div>
1241
+ <div class="tags">
1293
1242
 
1294
- </ul>
1295
1243
 
1296
1244
  </div><table class="source_code">
1297
1245
  <tr>
@@ -1299,12 +1247,12 @@
1299
1247
  <pre class="lines">
1300
1248
 
1301
1249
 
1302
- 65
1303
- 66
1304
- 67</pre>
1250
+ 20
1251
+ 21
1252
+ 22</pre>
1305
1253
  </td>
1306
1254
  <td>
1307
- <pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line 65</span>
1255
+ <pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line 20</span>
1308
1256
 
1309
1257
  <span class='kw'>def</span> <span class='id identifier rubyid_skip_list'>skip_list</span>
1310
1258
  <span class='ivar'>@skip_list</span>
@@ -1319,7 +1267,7 @@
1319
1267
  <div class="method_details ">
1320
1268
  <h3 class="signature " id="trace-class_method">
1321
1269
 
1322
- .<strong>trace</strong> &#x21d2; <tt>TracePoint</tt><sup>?</sup>
1270
+ .<strong>trace</strong> &#x21d2; <tt>Object</tt>
1323
1271
 
1324
1272
 
1325
1273
 
@@ -1328,26 +1276,13 @@
1328
1276
  </h3><div class="docstring">
1329
1277
  <div class="discussion">
1330
1278
 
1331
- <p>The TracePoint object used for tracing exceptions.</p>
1279
+ <p>Returns the value of attribute trace.</p>
1332
1280
 
1333
1281
 
1334
1282
  </div>
1335
1283
  </div>
1336
1284
  <div class="tags">
1337
1285
 
1338
- <p class="tag_title">Returns:</p>
1339
- <ul class="return">
1340
-
1341
- <li>
1342
-
1343
-
1344
- <span class='type'>(<tt>TracePoint</tt>, <tt>nil</tt>)</span>
1345
-
1346
-
1347
-
1348
- </li>
1349
-
1350
- </ul>
1351
1286
 
1352
1287
  </div><table class="source_code">
1353
1288
  <tr>
@@ -1355,12 +1290,12 @@
1355
1290
  <pre class="lines">
1356
1291
 
1357
1292
 
1358
- 35
1359
- 36
1360
- 37</pre>
1293
+ 20
1294
+ 21
1295
+ 22</pre>
1361
1296
  </td>
1362
1297
  <td>
1363
- <pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line 35</span>
1298
+ <pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line 20</span>
1364
1299
 
1365
1300
  <span class='kw'>def</span> <span class='id identifier rubyid_trace'>trace</span>
1366
1301
  <span class='ivar'>@trace</span>
@@ -1380,158 +1315,60 @@
1380
1315
  <div class="method_details first">
1381
1316
  <h3 class="signature first" id="add_to_skip_list-class_method">
1382
1317
 
1383
- .<strong>add_to_skip_list</strong>(*vars) &#x21d2; <tt>Set&lt;Symbol&gt;</tt>
1318
+ .<strong>add_to_skip_list</strong>(*vars) &#x21d2; <tt>Object</tt>
1384
1319
 
1385
1320
 
1386
1321
 
1387
1322
 
1388
1323
 
1389
- </h3><div class="docstring">
1390
- <div class="discussion">
1391
-
1392
- <p>Adds variables to the skip list to exclude them from binding information.</p>
1324
+ </h3><table class="source_code">
1325
+ <tr>
1326
+ <td>
1327
+ <pre class="lines">
1393
1328
 
1394
1329
 
1395
- </div>
1396
- </div>
1397
- <div class="tags">
1398
- <p class="tag_title">Parameters:</p>
1399
- <ul class="param">
1400
-
1401
- <li>
1402
-
1403
- <span class='name'>vars</span>
1404
-
1405
-
1406
- <span class='type'>(<tt>Symbol</tt>)</span>
1407
-
1408
-
1409
-
1410
- &mdash;
1411
- <div class='inline'>
1412
- <p>The variable names to add to the skip list.</p>
1413
- </div>
1414
-
1415
- </li>
1416
-
1417
- </ul>
1418
-
1419
- <p class="tag_title">Returns:</p>
1420
- <ul class="return">
1421
-
1422
- <li>
1423
-
1424
-
1425
- <span class='type'>(<tt>Set&lt;Symbol&gt;</tt>)</span>
1426
-
1427
-
1428
-
1429
- &mdash;
1430
- <div class='inline'>
1431
- <p>The updated skip list.</p>
1432
- </div>
1433
-
1434
- </li>
1435
-
1436
- </ul>
1437
-
1438
- </div><table class="source_code">
1439
- <tr>
1440
- <td>
1441
- <pre class="lines">
1442
-
1443
-
1444
- 153
1445
- 154
1446
- 155</pre>
1447
- </td>
1448
- <td>
1449
- <pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line 153</span>
1450
-
1451
- <span class='kw'>def</span> <span class='id identifier rubyid_add_to_skip_list'>add_to_skip_list</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_vars'>vars</span><span class='rparen'>)</span>
1452
- <span class='id identifier rubyid_skip_list'>skip_list</span><span class='period'>.</span><span class='id identifier rubyid_merge'>merge</span><span class='lparen'>(</span><span class='id identifier rubyid_vars'>vars</span><span class='rparen'>)</span>
1453
- <span class='kw'>end</span></pre>
1454
- </td>
1455
- </tr>
1456
- </table>
1330
+ 116
1331
+ 117
1332
+ 118</pre>
1333
+ </td>
1334
+ <td>
1335
+ <pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line 116</span>
1336
+
1337
+ <span class='kw'>def</span> <span class='id identifier rubyid_add_to_skip_list'>add_to_skip_list</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_vars'>vars</span><span class='rparen'>)</span>
1338
+ <span class='id identifier rubyid_skip_list'>skip_list</span><span class='period'>.</span><span class='id identifier rubyid_merge'>merge</span><span class='lparen'>(</span><span class='id identifier rubyid_vars'>vars</span><span class='rparen'>)</span>
1339
+ <span class='kw'>end</span></pre>
1340
+ </td>
1341
+ </tr>
1342
+ </table>
1457
1343
  </div>
1458
1344
 
1459
1345
  <div class="method_details ">
1460
1346
  <h3 class="signature " id="apply_skip_list-class_method">
1461
1347
 
1462
- .<strong>apply_skip_list</strong>(binding_info) &#x21d2; <tt>Hash</tt>
1348
+ .<strong>apply_skip_list</strong>(binding_info) &#x21d2; <tt>Object</tt>
1463
1349
 
1464
1350
 
1465
1351
 
1466
1352
 
1467
1353
 
1468
- </h3><div class="docstring">
1469
- <div class="discussion">
1470
-
1471
- <p>Applies the skip list to the captured binding information, excluding specified variables.</p>
1472
-
1473
-
1474
- </div>
1475
- </div>
1476
- <div class="tags">
1477
- <p class="tag_title">Parameters:</p>
1478
- <ul class="param">
1479
-
1480
- <li>
1481
-
1482
- <span class='name'>binding_info</span>
1483
-
1484
-
1485
- <span class='type'>(<tt>Hash</tt>)</span>
1486
-
1487
-
1488
-
1489
- &mdash;
1490
- <div class='inline'>
1491
- <p>The binding information to filter.</p>
1492
- </div>
1493
-
1494
- </li>
1495
-
1496
- </ul>
1497
-
1498
- <p class="tag_title">Returns:</p>
1499
- <ul class="return">
1500
-
1501
- <li>
1502
-
1503
-
1504
- <span class='type'>(<tt>Hash</tt>)</span>
1505
-
1506
-
1507
-
1508
- &mdash;
1509
- <div class='inline'>
1510
- <p>The filtered binding information.</p>
1511
- </div>
1512
-
1513
- </li>
1514
-
1515
- </ul>
1516
-
1517
- </div><table class="source_code">
1354
+ </h3><table class="source_code">
1518
1355
  <tr>
1519
1356
  <td>
1520
1357
  <pre class="lines">
1521
1358
 
1522
1359
 
1523
- 327
1524
- 328
1525
- 329
1526
- 330
1527
- 331
1528
- 332
1529
- 333
1530
- 334
1531
- 335</pre>
1360
+ 360
1361
+ 361
1362
+ 362
1363
+ 363
1364
+ 364
1365
+ 365
1366
+ 366
1367
+ 367
1368
+ 368</pre>
1532
1369
  </td>
1533
1370
  <td>
1534
- <pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line 327</span>
1371
+ <pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line 360</span>
1535
1372
 
1536
1373
  <span class='kw'>def</span> <span class='id identifier rubyid_apply_skip_list'>apply_skip_list</span><span class='lparen'>(</span><span class='id identifier rubyid_binding_info'>binding_info</span><span class='rparen'>)</span>
1537
1374
  <span class='kw'>unless</span> <span class='ivar'>@debug</span>
@@ -1550,91 +1387,18 @@
1550
1387
  <div class="method_details ">
1551
1388
  <h3 class="signature " id="binding_info_string-class_method">
1552
1389
 
1553
- .<strong>binding_info_string</strong>(binding_info) &#x21d2; <tt>String</tt>
1390
+ .<strong>binding_info_string</strong>(binding_info) &#x21d2; <tt>Object</tt>
1554
1391
 
1555
1392
 
1556
1393
 
1557
1394
 
1558
1395
 
1559
- </h3><div class="docstring">
1560
- <div class="discussion">
1561
-
1562
- <p>Formats a single binding information hash into a string with colorization.</p>
1563
-
1564
-
1565
- </div>
1566
- </div>
1567
- <div class="tags">
1568
- <p class="tag_title">Parameters:</p>
1569
- <ul class="param">
1570
-
1571
- <li>
1572
-
1573
- <span class='name'>binding_info</span>
1574
-
1575
-
1576
- <span class='type'>(<tt>Hash</tt>)</span>
1577
-
1578
-
1579
-
1580
- &mdash;
1581
- <div class='inline'>
1582
- <p>The binding information to format.</p>
1583
- </div>
1584
-
1585
- </li>
1586
-
1587
- </ul>
1588
-
1589
- <p class="tag_title">Returns:</p>
1590
- <ul class="return">
1591
-
1592
- <li>
1593
-
1594
-
1595
- <span class='type'>(<tt>String</tt>)</span>
1596
-
1597
-
1598
-
1599
- &mdash;
1600
- <div class='inline'>
1601
- <p>The formatted string.</p>
1602
- </div>
1603
-
1604
- </li>
1605
-
1606
- </ul>
1607
-
1608
- </div><table class="source_code">
1396
+ </h3><table class="source_code">
1609
1397
  <tr>
1610
1398
  <td>
1611
1399
  <pre class="lines">
1612
1400
 
1613
1401
 
1614
- 353
1615
- 354
1616
- 355
1617
- 356
1618
- 357
1619
- 358
1620
- 359
1621
- 360
1622
- 361
1623
- 362
1624
- 363
1625
- 364
1626
- 365
1627
- 366
1628
- 367
1629
- 368
1630
- 369
1631
- 370
1632
- 371
1633
- 372
1634
- 373
1635
- 374
1636
- 375
1637
- 376
1638
1402
  377
1639
1403
  378
1640
1404
  379
@@ -1646,35 +1410,71 @@
1646
1410
  385
1647
1411
  386
1648
1412
  387
1649
- 388</pre>
1413
+ 388
1414
+ 389
1415
+ 390
1416
+ 391
1417
+ 392
1418
+ 393
1419
+ 394
1420
+ 395
1421
+ 396
1422
+ 397
1423
+ 398
1424
+ 399
1425
+ 400
1426
+ 401
1427
+ 402
1428
+ 403
1429
+ 404
1430
+ 405
1431
+ 406
1432
+ 407
1433
+ 408
1434
+ 409
1435
+ 410
1436
+ 411
1437
+ 412
1438
+ 413
1439
+ 414
1440
+ 415
1441
+ 416
1442
+ 417</pre>
1650
1443
  </td>
1651
1444
  <td>
1652
- <pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line 353</span>
1445
+ <pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line 377</span>
1653
1446
 
1654
1447
  <span class='kw'>def</span> <span class='id identifier rubyid_binding_info_string'>binding_info_string</span><span class='lparen'>(</span><span class='id identifier rubyid_binding_info'>binding_info</span><span class='rparen'>)</span>
1655
- <span class='id identifier rubyid_capture_event'>capture_event</span> <span class='op'>=</span> <span class='id identifier rubyid_binding_info'>binding_info</span><span class='lbracket'>[</span><span class='symbol'>:capture_event</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='period'>.</span><span class='id identifier rubyid_capitalize'>capitalize</span>
1656
- <span class='id identifier rubyid_result'>result</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='const'><span class='object_link'><a href="Colors.html" title="Colors (class)">Colors</a></span></span><span class='period'>.</span><span class='id identifier rubyid_red'>red</span><span class='lparen'>(</span><span class='id identifier rubyid_capture_event'>capture_event</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'>: </span><span class='embexpr_beg'>#{</span><span class='const'><span class='object_link'><a href="Colors.html" title="Colors (class)">Colors</a></span></span><span class='period'>.</span><span class='id identifier rubyid_blue'>blue</span><span class='lparen'>(</span><span class='id identifier rubyid_binding_info'>binding_info</span><span class='lbracket'>[</span><span class='symbol'>:source</span><span class='rbracket'>]</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span>
1657
-
1658
- <span class='id identifier rubyid_result'>result</span> <span class='op'>+=</span> <span class='id identifier rubyid_method_and_args_desc'>method_and_args_desc</span><span class='lparen'>(</span><span class='id identifier rubyid_binding_info'>binding_info</span><span class='lbracket'>[</span><span class='symbol'>:method_and_args</span><span class='rbracket'>]</span><span class='rparen'>)</span>
1448
+ <span class='id identifier rubyid_exception'>exception</span> <span class='op'>=</span> <span class='id identifier rubyid_safe_to_s'>safe_to_s</span><span class='lparen'>(</span><span class='id identifier rubyid_binding_info'>binding_info</span><span class='lbracket'>[</span><span class='symbol'>:exception</span><span class='rbracket'>]</span><span class='rparen'>)</span>
1449
+ <span class='id identifier rubyid_capture_event'>capture_event</span> <span class='op'>=</span> <span class='id identifier rubyid_safe_to_s'>safe_to_s</span><span class='lparen'>(</span><span class='id identifier rubyid_binding_info'>binding_info</span><span class='lbracket'>[</span><span class='symbol'>:capture_event</span><span class='rbracket'>]</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_capitalize'>capitalize</span>
1450
+ <span class='id identifier rubyid_source'>source</span> <span class='op'>=</span> <span class='id identifier rubyid_safe_to_s'>safe_to_s</span><span class='lparen'>(</span><span class='id identifier rubyid_binding_info'>binding_info</span><span class='lbracket'>[</span><span class='symbol'>:source</span><span class='rbracket'>]</span><span class='rparen'>)</span>
1451
+ <span class='id identifier rubyid_result'>result</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_end'>&#39;</span></span>
1452
+ <span class='kw'>unless</span> <span class='id identifier rubyid_exception'>exception</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>NoException</span><span class='tstring_end'>&#39;</span></span>
1453
+ <span class='id identifier rubyid_origination'>origination</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_capture_event'>capture_event</span><span class='period'>.</span><span class='id identifier rubyid_capitalize'>capitalize</span><span class='embexpr_end'>}</span><span class='tstring_content'>d</span><span class='tstring_end'>&quot;</span></span>
1454
+ <span class='id identifier rubyid_result'>result</span> <span class='op'>+=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='const'><span class='object_link'><a href="Enhanced/Colors.html" title="Enhanced::Colors (class)">Colors</a></span></span><span class='period'>.</span><span class='id identifier rubyid_green'>green</span><span class='lparen'>(</span><span class='id identifier rubyid_origination'>origination</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'>: </span><span class='embexpr_beg'>#{</span><span class='const'><span class='object_link'><a href="Enhanced/Colors.html" title="Enhanced::Colors (class)">Colors</a></span></span><span class='period'>.</span><span class='id identifier rubyid_blue'>blue</span><span class='lparen'>(</span><span class='id identifier rubyid_source'>source</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span>
1455
+ <span class='kw'>end</span>
1456
+ <span class='id identifier rubyid_method_desc'>method_desc</span> <span class='op'>=</span> <span class='id identifier rubyid_method_and_args_desc'>method_and_args_desc</span><span class='lparen'>(</span><span class='id identifier rubyid_binding_info'>binding_info</span><span class='lbracket'>[</span><span class='symbol'>:method_and_args</span><span class='rbracket'>]</span><span class='rparen'>)</span>
1457
+ <span class='id identifier rubyid_result'>result</span> <span class='op'>+=</span> <span class='id identifier rubyid_method_desc'>method_desc</span>
1659
1458
 
1660
1459
  <span class='id identifier rubyid_variables'>variables</span> <span class='op'>=</span> <span class='id identifier rubyid_binding_info'>binding_info</span><span class='lbracket'>[</span><span class='symbol'>:variables</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
1661
1460
 
1662
1461
  <span class='kw'>if</span> <span class='id identifier rubyid_variables'>variables</span><span class='lbracket'>[</span><span class='symbol'>:locals</span><span class='rbracket'>]</span> <span class='op'>&amp;&amp;</span> <span class='op'>!</span><span class='id identifier rubyid_variables'>variables</span><span class='lbracket'>[</span><span class='symbol'>:locals</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
1663
- <span class='id identifier rubyid_result'>result</span> <span class='op'>+=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>\n</span><span class='embexpr_beg'>#{</span><span class='const'><span class='object_link'><a href="Colors.html" title="Colors (class)">Colors</a></span></span><span class='period'>.</span><span class='id identifier rubyid_green'>green</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Locals:</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'>\n</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_variable_description'>variable_description</span><span class='lparen'>(</span><span class='id identifier rubyid_variables'>variables</span><span class='lbracket'>[</span><span class='symbol'>:locals</span><span class='rbracket'>]</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span>
1462
+ <span class='id identifier rubyid_result'>result</span> <span class='op'>+=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>\n</span><span class='embexpr_beg'>#{</span><span class='const'><span class='object_link'><a href="Enhanced/Colors.html" title="Enhanced::Colors (class)">Colors</a></span></span><span class='period'>.</span><span class='id identifier rubyid_green'>green</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Locals:</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'>\n</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_variable_description'>variable_description</span><span class='lparen'>(</span><span class='id identifier rubyid_variables'>variables</span><span class='lbracket'>[</span><span class='symbol'>:locals</span><span class='rbracket'>]</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span>
1664
1463
  <span class='kw'>end</span>
1665
1464
 
1666
1465
  <span class='id identifier rubyid_instance_vars_to_display'>instance_vars_to_display</span> <span class='op'>=</span> <span class='id identifier rubyid_variables'>variables</span><span class='lbracket'>[</span><span class='symbol'>:instances</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
1667
1466
 
1668
1467
  <span class='kw'>if</span> <span class='id identifier rubyid_instance_vars_to_display'>instance_vars_to_display</span> <span class='op'>&amp;&amp;</span> <span class='op'>!</span><span class='id identifier rubyid_instance_vars_to_display'>instance_vars_to_display</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
1669
- <span class='id identifier rubyid_result'>result</span> <span class='op'>+=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>\n</span><span class='embexpr_beg'>#{</span><span class='const'><span class='object_link'><a href="Colors.html" title="Colors (class)">Colors</a></span></span><span class='period'>.</span><span class='id identifier rubyid_green'>green</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Instances:</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'>\n</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_variable_description'>variable_description</span><span class='lparen'>(</span><span class='id identifier rubyid_instance_vars_to_display'>instance_vars_to_display</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span>
1468
+ <span class='id identifier rubyid_result'>result</span> <span class='op'>+=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>\n</span><span class='embexpr_beg'>#{</span><span class='const'><span class='object_link'><a href="Enhanced/Colors.html" title="Enhanced::Colors (class)">Colors</a></span></span><span class='period'>.</span><span class='id identifier rubyid_green'>green</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Instances:</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'>\n</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_variable_description'>variable_description</span><span class='lparen'>(</span><span class='id identifier rubyid_instance_vars_to_display'>instance_vars_to_display</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span>
1670
1469
  <span class='kw'>end</span>
1671
1470
 
1672
- <span class='kw'>if</span> <span class='id identifier rubyid_variables'>variables</span><span class='lbracket'>[</span><span class='symbol'>:lets</span><span class='rbracket'>]</span> <span class='op'>&amp;&amp;</span> <span class='op'>!</span><span class='id identifier rubyid_variables'>variables</span><span class='lbracket'>[</span><span class='symbol'>:lets</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
1673
- <span class='id identifier rubyid_result'>result</span> <span class='op'>+=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>\n</span><span class='embexpr_beg'>#{</span><span class='const'><span class='object_link'><a href="Colors.html" title="Colors (class)">Colors</a></span></span><span class='period'>.</span><span class='id identifier rubyid_green'>green</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Let Variables:</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'>\n</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_variable_description'>variable_description</span><span class='lparen'>(</span><span class='id identifier rubyid_variables'>variables</span><span class='lbracket'>[</span><span class='symbol'>:lets</span><span class='rbracket'>]</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span>
1471
+ <span class='comment'># Display let variables for RSpec captures
1472
+ </span> <span class='kw'>if</span> <span class='id identifier rubyid_variables'>variables</span><span class='lbracket'>[</span><span class='symbol'>:lets</span><span class='rbracket'>]</span> <span class='op'>&amp;&amp;</span> <span class='op'>!</span><span class='id identifier rubyid_variables'>variables</span><span class='lbracket'>[</span><span class='symbol'>:lets</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
1473
+ <span class='id identifier rubyid_result'>result</span> <span class='op'>+=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>\n</span><span class='embexpr_beg'>#{</span><span class='const'><span class='object_link'><a href="Enhanced/Colors.html" title="Enhanced::Colors (class)">Colors</a></span></span><span class='period'>.</span><span class='id identifier rubyid_green'>green</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Let Variables:</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'>\n</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_variable_description'>variable_description</span><span class='lparen'>(</span><span class='id identifier rubyid_variables'>variables</span><span class='lbracket'>[</span><span class='symbol'>:lets</span><span class='rbracket'>]</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span>
1674
1474
  <span class='kw'>end</span>
1675
1475
 
1676
1476
  <span class='kw'>if</span> <span class='id identifier rubyid_variables'>variables</span><span class='lbracket'>[</span><span class='symbol'>:globals</span><span class='rbracket'>]</span> <span class='op'>&amp;&amp;</span> <span class='op'>!</span><span class='id identifier rubyid_variables'>variables</span><span class='lbracket'>[</span><span class='symbol'>:globals</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
1677
- <span class='id identifier rubyid_result'>result</span> <span class='op'>+=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>\n</span><span class='embexpr_beg'>#{</span><span class='const'><span class='object_link'><a href="Colors.html" title="Colors (class)">Colors</a></span></span><span class='period'>.</span><span class='id identifier rubyid_green'>green</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Globals:</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'>\n</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_variable_description'>variable_description</span><span class='lparen'>(</span><span class='id identifier rubyid_variables'>variables</span><span class='lbracket'>[</span><span class='symbol'>:globals</span><span class='rbracket'>]</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span>
1477
+ <span class='id identifier rubyid_result'>result</span> <span class='op'>+=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>\n</span><span class='embexpr_beg'>#{</span><span class='const'><span class='object_link'><a href="Enhanced/Colors.html" title="Enhanced::Colors (class)">Colors</a></span></span><span class='period'>.</span><span class='id identifier rubyid_green'>green</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Globals:</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'>\n</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_variable_description'>variable_description</span><span class='lparen'>(</span><span class='id identifier rubyid_variables'>variables</span><span class='lbracket'>[</span><span class='symbol'>:globals</span><span class='rbracket'>]</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span>
1678
1478
  <span class='kw'>end</span>
1679
1479
 
1680
1480
  <span class='kw'>if</span> <span class='id identifier rubyid_result'>result</span><span class='period'>.</span><span class='id identifier rubyid_length'>length</span> <span class='op'>&gt;</span> <span class='id identifier rubyid_max_length'>max_length</span>
@@ -1682,10 +1482,8 @@
1682
1482
  <span class='kw'>end</span>
1683
1483
  <span class='id identifier rubyid_result'>result</span> <span class='op'>+</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>\n</span><span class='tstring_end'>&quot;</span></span>
1684
1484
  <span class='kw'>rescue</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_e'>e</span>
1685
- <span class='comment'># we swallow and don&#39;t re-raise to avoid any recursion problems. We don&#39;t want to
1686
- </span> <span class='comment'># mess up the original exception handling.
1687
- </span> <span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>EnhancedErrors error in binding_info_string: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_e'>e</span><span class='period'>.</span><span class='id identifier rubyid_message'>message</span><span class='embexpr_end'>}</span><span class='tstring_content'> </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_e'>e</span><span class='period'>.</span><span class='id identifier rubyid_backtrace'>backtrace</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span>
1688
- <span class='kw'>return</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_end'>&#39;</span></span>
1485
+ <span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_e'>e</span><span class='period'>.</span><span class='id identifier rubyid_message'>message</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span>
1486
+ <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_end'>&#39;</span></span>
1689
1487
  <span class='kw'>end</span></pre>
1690
1488
  </td>
1691
1489
  </tr>
@@ -1695,120 +1493,147 @@
1695
1493
  <div class="method_details ">
1696
1494
  <h3 class="signature " id="binding_infos_array_to_string-class_method">
1697
1495
 
1698
- .<strong>binding_infos_array_to_string</strong>(captured_bindings, format = :terminal) &#x21d2; <tt>String</tt>
1496
+ .<strong>binding_infos_array_to_string</strong>(captured_bindings, format = :terminal) &#x21d2; <tt>Object</tt>
1699
1497
 
1700
1498
 
1701
1499
 
1702
1500
 
1703
1501
 
1704
- </h3><div class="docstring">
1705
- <div class="discussion">
1706
-
1707
- <p>Converts an array of binding information hashes into a formatted string.</p>
1502
+ </h3><table class="source_code">
1503
+ <tr>
1504
+ <td>
1505
+ <pre class="lines">
1708
1506
 
1709
1507
 
1710
- </div>
1711
- </div>
1712
- <div class="tags">
1713
- <p class="tag_title">Parameters:</p>
1714
- <ul class="param">
1715
-
1716
- <li>
1717
-
1718
- <span class='name'>captured_bindings</span>
1719
-
1720
-
1721
- <span class='type'>(<tt>Array&lt;Hash&gt;</tt>)</span>
1722
-
1723
-
1724
-
1725
- &mdash;
1726
- <div class='inline'>
1727
- <p>The array of binding information.</p>
1508
+ 321
1509
+ 322
1510
+ 323
1511
+ 324
1512
+ 325
1513
+ 326
1514
+ 327</pre>
1515
+ </td>
1516
+ <td>
1517
+ <pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line 321</span>
1518
+
1519
+ <span class='kw'>def</span> <span class='id identifier rubyid_binding_infos_array_to_string'>binding_infos_array_to_string</span><span class='lparen'>(</span><span class='id identifier rubyid_captured_bindings'>captured_bindings</span><span class='comma'>,</span> <span class='id identifier rubyid_format'>format</span> <span class='op'>=</span> <span class='symbol'>:terminal</span><span class='rparen'>)</span>
1520
+ <span class='kw'>return</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_end'>&#39;</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_captured_bindings'>captured_bindings</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='op'>||</span> <span class='id identifier rubyid_captured_bindings'>captured_bindings</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
1521
+ <span class='id identifier rubyid_captured_bindings'>captured_bindings</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='id identifier rubyid_captured_bindings'>captured_bindings</span><span class='rbracket'>]</span> <span class='kw'>unless</span> <span class='id identifier rubyid_captured_bindings'>captured_bindings</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Array</span><span class='rparen'>)</span>
1522
+ <span class='const'><span class='object_link'><a href="Enhanced/Colors.html" title="Enhanced::Colors (class)">Colors</a></span></span><span class='period'>.</span><span class='id identifier rubyid_enabled'>enabled</span> <span class='op'>=</span> <span class='id identifier rubyid_format'>format</span> <span class='op'>==</span> <span class='symbol'>:terminal</span>
1523
+ <span class='id identifier rubyid_formatted_bindings'>formatted_bindings</span> <span class='op'>=</span> <span class='id identifier rubyid_captured_bindings'>captured_bindings</span><span class='period'>.</span><span class='id identifier rubyid_to_a'>to_a</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_binding_info'>binding_info</span><span class='op'>|</span> <span class='id identifier rubyid_binding_info_string'>binding_info_string</span><span class='lparen'>(</span><span class='id identifier rubyid_binding_info'>binding_info</span><span class='rparen'>)</span> <span class='rbrace'>}</span>
1524
+ <span class='id identifier rubyid_format'>format</span> <span class='op'>==</span> <span class='symbol'>:json</span> <span class='op'>?</span> <span class='const'>JSON</span><span class='period'>.</span><span class='id identifier rubyid_pretty_generate'>pretty_generate</span><span class='lparen'>(</span><span class='id identifier rubyid_captured_bindings'>captured_bindings</span><span class='rparen'>)</span> <span class='op'>:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>\n</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_formatted_bindings'>formatted_bindings</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>\n</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span>
1525
+ <span class='kw'>end</span></pre>
1526
+ </td>
1527
+ </tr>
1528
+ </table>
1728
1529
  </div>
1729
-
1730
- </li>
1530
+
1531
+ <div class="method_details ">
1532
+ <h3 class="signature " id="convert_binding_to_binding_info-class_method">
1731
1533
 
1732
- <li>
1733
-
1734
- <span class='name'>format</span>
1735
-
1736
-
1737
- <span class='type'>(<tt>Symbol</tt>)</span>
1738
-
1739
-
1740
- <em class="default">(defaults to: <tt>:terminal</tt>)</em>
1741
-
1742
-
1743
- &mdash;
1744
- <div class='inline'>
1745
- <p>The format to use (:json, :plaintext, :terminal).</p>
1746
- </div>
1747
-
1748
- </li>
1534
+ .<strong>convert_binding_to_binding_info</strong>(b, capture_let_variables: true) &#x21d2; <tt>Object</tt>
1749
1535
 
1750
- </ul>
1751
1536
 
1752
- <p class="tag_title">Returns:</p>
1753
- <ul class="return">
1754
1537
 
1755
- <li>
1756
-
1757
-
1758
- <span class='type'>(<tt>String</tt>)</span>
1759
-
1760
-
1761
-
1762
- &mdash;
1763
- <div class='inline'>
1764
- <p>The formatted string representation of the binding information.</p>
1765
- </div>
1766
-
1767
- </li>
1768
-
1769
- </ul>
1770
1538
 
1771
- </div><table class="source_code">
1539
+
1540
+ </h3><table class="source_code">
1772
1541
  <tr>
1773
1542
  <td>
1774
1543
  <pre class="lines">
1775
1544
 
1776
1545
 
1777
- 269
1778
- 270
1779
- 271
1780
- 272
1781
- 273
1782
- 274
1783
- 275
1784
- 276
1785
- 277
1786
- 278
1787
- 279
1788
- 280
1789
- 281
1790
- 282
1791
- 283
1792
- 284</pre>
1546
+ 223
1547
+ 224
1548
+ 225
1549
+ 226
1550
+ 227
1551
+ 228
1552
+ 229
1553
+ 230
1554
+ 231
1555
+ 232
1556
+ 233
1557
+ 234
1558
+ 235
1559
+ 236
1560
+ 237
1561
+ 238
1562
+ 239
1563
+ 240
1564
+ 241
1565
+ 242
1566
+ 243
1567
+ 244
1568
+ 245
1569
+ 246
1570
+ 247
1571
+ 248
1572
+ 249
1573
+ 250
1574
+ 251
1575
+ 252
1576
+ 253
1577
+ 254
1578
+ 255
1579
+ 256
1580
+ 257
1581
+ 258
1582
+ 259
1583
+ 260
1584
+ 261
1585
+ 262
1586
+ 263
1587
+ 264
1588
+ 265
1589
+ 266</pre>
1793
1590
  </td>
1794
1591
  <td>
1795
- <pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line 269</span>
1796
-
1797
- <span class='kw'>def</span> <span class='id identifier rubyid_binding_infos_array_to_string'>binding_infos_array_to_string</span><span class='lparen'>(</span><span class='id identifier rubyid_captured_bindings'>captured_bindings</span><span class='comma'>,</span> <span class='id identifier rubyid_format'>format</span> <span class='op'>=</span> <span class='symbol'>:terminal</span><span class='rparen'>)</span>
1798
- <span class='kw'>case</span> <span class='id identifier rubyid_format'>format</span>
1799
- <span class='kw'>when</span> <span class='symbol'>:json</span>
1800
- <span class='const'><span class='object_link'><a href="Colors.html" title="Colors (class)">Colors</a></span></span><span class='period'>.</span><span class='id identifier rubyid_enabled'>enabled</span> <span class='op'>=</span> <span class='kw'>false</span>
1801
- <span class='const'>JSON</span><span class='period'>.</span><span class='id identifier rubyid_pretty_generate'>pretty_generate</span><span class='lparen'>(</span><span class='id identifier rubyid_captured_bindings'>captured_bindings</span><span class='rparen'>)</span>
1802
- <span class='kw'>when</span> <span class='symbol'>:plaintext</span>
1803
- <span class='const'><span class='object_link'><a href="Colors.html" title="Colors (class)">Colors</a></span></span><span class='period'>.</span><span class='id identifier rubyid_enabled'>enabled</span> <span class='op'>=</span> <span class='kw'>false</span>
1804
- <span class='id identifier rubyid_captured_bindings'>captured_bindings</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_binding_info'>binding_info</span><span class='op'>|</span> <span class='id identifier rubyid_binding_info_string'>binding_info_string</span><span class='lparen'>(</span><span class='id identifier rubyid_binding_info'>binding_info</span><span class='rparen'>)</span> <span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>\n</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
1805
- <span class='kw'>when</span> <span class='symbol'>:terminal</span>
1806
- <span class='const'><span class='object_link'><a href="Colors.html" title="Colors (class)">Colors</a></span></span><span class='period'>.</span><span class='id identifier rubyid_enabled'>enabled</span> <span class='op'>=</span> <span class='kw'>true</span>
1807
- <span class='id identifier rubyid_captured_bindings'>captured_bindings</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_binding_info'>binding_info</span><span class='op'>|</span> <span class='id identifier rubyid_binding_info_string'>binding_info_string</span><span class='lparen'>(</span><span class='id identifier rubyid_binding_info'>binding_info</span><span class='rparen'>)</span> <span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>\n</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
1808
- <span class='kw'>else</span>
1809
- <span class='const'><span class='object_link'><a href="Colors.html" title="Colors (class)">Colors</a></span></span><span class='period'>.</span><span class='id identifier rubyid_enabled'>enabled</span> <span class='op'>=</span> <span class='kw'>false</span>
1810
- <span class='id identifier rubyid_captured_bindings'>captured_bindings</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_binding_info'>binding_info</span><span class='op'>|</span> <span class='id identifier rubyid_binding_info_string'>binding_info_string</span><span class='lparen'>(</span><span class='id identifier rubyid_binding_info'>binding_info</span><span class='rparen'>)</span> <span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>\n</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
1592
+ <pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line 223</span>
1593
+
1594
+ <span class='kw'>def</span> <span class='id identifier rubyid_convert_binding_to_binding_info'>convert_binding_to_binding_info</span><span class='lparen'>(</span><span class='id identifier rubyid_b'>b</span><span class='comma'>,</span> <span class='label'>capture_let_variables:</span> <span class='kw'>true</span><span class='rparen'>)</span>
1595
+ <span class='id identifier rubyid_file'>file</span> <span class='op'>=</span> <span class='id identifier rubyid_b'>b</span><span class='period'>.</span><span class='id identifier rubyid_eval'>eval</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>__FILE__</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='kw'>rescue</span> <span class='kw'>nil</span>
1596
+ <span class='id identifier rubyid_line'>line</span> <span class='op'>=</span> <span class='id identifier rubyid_b'>b</span><span class='period'>.</span><span class='id identifier rubyid_eval'>eval</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>__LINE__</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='kw'>rescue</span> <span class='kw'>nil</span>
1597
+ <span class='id identifier rubyid_location'>location</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='id identifier rubyid_file'>file</span><span class='comma'>,</span> <span class='id identifier rubyid_line'>line</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_compact'>compact</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>:</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
1598
+
1599
+ <span class='id identifier rubyid_locals'>locals</span> <span class='op'>=</span> <span class='id identifier rubyid_b'>b</span><span class='period'>.</span><span class='id identifier rubyid_local_variables'>local_variables</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_var'>var</span><span class='op'>|</span> <span class='lbracket'>[</span><span class='id identifier rubyid_var'>var</span><span class='comma'>,</span> <span class='id identifier rubyid_safe_local_variable_get'>safe_local_variable_get</span><span class='lparen'>(</span><span class='id identifier rubyid_b'>b</span><span class='comma'>,</span> <span class='id identifier rubyid_var'>var</span><span class='rparen'>)</span><span class='rbracket'>]</span> <span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_to_h'>to_h</span>
1600
+ <span class='id identifier rubyid_receiver'>receiver</span> <span class='op'>=</span> <span class='id identifier rubyid_b'>b</span><span class='period'>.</span><span class='id identifier rubyid_receiver'>receiver</span>
1601
+ <span class='id identifier rubyid_instance_vars'>instance_vars</span> <span class='op'>=</span> <span class='id identifier rubyid_receiver'>receiver</span><span class='period'>.</span><span class='id identifier rubyid_instance_variables'>instance_variables</span>
1602
+ <span class='id identifier rubyid_instances'>instances</span> <span class='op'>=</span> <span class='id identifier rubyid_instance_vars'>instance_vars</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_var'>var</span><span class='op'>|</span> <span class='lbracket'>[</span><span class='id identifier rubyid_var'>var</span><span class='comma'>,</span> <span class='id identifier rubyid_safe_instance_variable_get'>safe_instance_variable_get</span><span class='lparen'>(</span><span class='id identifier rubyid_receiver'>receiver</span><span class='comma'>,</span> <span class='id identifier rubyid_var'>var</span><span class='rparen'>)</span><span class='rbracket'>]</span> <span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_to_h'>to_h</span>
1603
+
1604
+ <span class='comment'># Capture let variables only for RSpec captures
1605
+ </span> <span class='id identifier rubyid_lets'>lets</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
1606
+ <span class='kw'>if</span> <span class='id identifier rubyid_capture_let_variables'>capture_let_variables</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_instance_vars'>instance_vars</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='symbol'>:@__memoized</span><span class='rparen'>)</span>
1607
+ <span class='id identifier rubyid_outer_memoized'>outer_memoized</span> <span class='op'>=</span> <span class='id identifier rubyid_receiver'>receiver</span><span class='period'>.</span><span class='id identifier rubyid_instance_variable_get'>instance_variable_get</span><span class='lparen'>(</span><span class='symbol'>:@__memoized</span><span class='rparen'>)</span>
1608
+ <span class='id identifier rubyid_memoized'>memoized</span> <span class='op'>=</span> <span class='id identifier rubyid_outer_memoized'>outer_memoized</span><span class='period'>.</span><span class='id identifier rubyid_instance_variable_get'>instance_variable_get</span><span class='lparen'>(</span><span class='symbol'>:@memoized</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_outer_memoized'>outer_memoized</span><span class='period'>.</span><span class='id identifier rubyid_respond_to?'>respond_to?</span><span class='lparen'>(</span><span class='symbol'>:instance_variable_get</span><span class='rparen'>)</span>
1609
+ <span class='kw'>if</span> <span class='id identifier rubyid_memoized'>memoized</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Hash</span><span class='rparen'>)</span>
1610
+ <span class='id identifier rubyid_lets'>lets</span> <span class='op'>=</span> <span class='id identifier rubyid_memoized'>memoized</span><span class='period'>.</span><span class='id identifier rubyid_transform_keys'>transform_keys</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='symbol'>:to_sym</span><span class='rparen'>)</span>
1611
+ <span class='kw'>end</span>
1811
1612
  <span class='kw'>end</span>
1613
+
1614
+ <span class='id identifier rubyid_binding_info'>binding_info</span> <span class='op'>=</span> <span class='lbrace'>{</span>
1615
+ <span class='label'>source:</span> <span class='id identifier rubyid_location'>location</span><span class='comma'>,</span>
1616
+ <span class='label'>object:</span> <span class='id identifier rubyid_receiver'>receiver</span><span class='comma'>,</span>
1617
+ <span class='label'>library:</span> <span class='op'>!</span><span class='op'>!</span><span class='const'><span class='object_link'><a href="#GEMS_REGEX-constant" title="EnhancedErrors::GEMS_REGEX (constant)">GEMS_REGEX</a></span></span><span class='period'>.</span><span class='id identifier rubyid_match?'>match?</span><span class='lparen'>(</span><span class='id identifier rubyid_location'>location</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='rparen'>)</span><span class='comma'>,</span>
1618
+ <span class='label'>method_and_args:</span> <span class='lbrace'>{</span>
1619
+ <span class='label'>object_name:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
1620
+ <span class='label'>args:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_end'>&#39;</span></span>
1621
+ <span class='rbrace'>}</span><span class='comma'>,</span>
1622
+ <span class='label'>test_name:</span> <span class='id identifier rubyid_test_name'>test_name</span><span class='comma'>,</span>
1623
+ <span class='label'>variables:</span> <span class='lbrace'>{</span>
1624
+ <span class='label'>locals:</span> <span class='id identifier rubyid_locals'>locals</span><span class='comma'>,</span>
1625
+ <span class='label'>instances:</span> <span class='id identifier rubyid_instances'>instances</span><span class='comma'>,</span>
1626
+ <span class='label'>lets:</span> <span class='id identifier rubyid_lets'>lets</span><span class='comma'>,</span>
1627
+ <span class='label'>globals:</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
1628
+ <span class='rbrace'>}</span><span class='comma'>,</span>
1629
+ <span class='label'>exception:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>NoException</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
1630
+ <span class='label'>capture_event:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>RSpecContext</span><span class='tstring_end'>&#39;</span></span>
1631
+ <span class='rbrace'>}</span>
1632
+
1633
+ <span class='comment'># Apply skip list to remove @__memoized and @__inspect_output from output
1634
+ </span> <span class='comment'># but only after extracting let variables.
1635
+ </span> <span class='id identifier rubyid_binding_info'>binding_info</span> <span class='op'>=</span> <span class='id identifier rubyid_default_on_capture'>default_on_capture</span><span class='lparen'>(</span><span class='id identifier rubyid_binding_info'>binding_info</span><span class='rparen'>)</span>
1636
+ <span class='id identifier rubyid_binding_info'>binding_info</span>
1812
1637
  <span class='kw'>end</span></pre>
1813
1638
  </td>
1814
1639
  </tr>
@@ -1818,53 +1643,24 @@
1818
1643
  <div class="method_details ">
1819
1644
  <h3 class="signature " id="default_skip_list-class_method">
1820
1645
 
1821
- .<strong>default_skip_list</strong> &#x21d2; <tt>Set&lt;Symbol&gt;</tt>
1646
+ .<strong>default_skip_list</strong> &#x21d2; <tt>Object</tt>
1822
1647
 
1823
1648
 
1824
1649
 
1825
1650
 
1826
1651
 
1827
- </h3><div class="docstring">
1828
- <div class="discussion">
1829
-
1830
- <p>Initializes the default skip list by merging Rails and RSpec specific variables.</p>
1831
-
1832
-
1833
- </div>
1834
- </div>
1835
- <div class="tags">
1836
-
1837
- <p class="tag_title">Returns:</p>
1838
- <ul class="return">
1839
-
1840
- <li>
1841
-
1842
-
1843
- <span class='type'>(<tt>Set&lt;Symbol&gt;</tt>)</span>
1844
-
1845
-
1846
-
1847
- &mdash;
1848
- <div class='inline'>
1849
- <p>The default skip list.</p>
1850
- </div>
1851
-
1852
- </li>
1853
-
1854
- </ul>
1855
-
1856
- </div><table class="source_code">
1652
+ </h3><table class="source_code">
1857
1653
  <tr>
1858
1654
  <td>
1859
1655
  <pre class="lines">
1860
1656
 
1861
1657
 
1862
- 145
1863
- 146
1864
- 147</pre>
1658
+ 98
1659
+ 99
1660
+ 100</pre>
1865
1661
  </td>
1866
1662
  <td>
1867
- <pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line 145</span>
1663
+ <pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line 98</span>
1868
1664
 
1869
1665
  <span class='kw'>def</span> <span class='id identifier rubyid_default_skip_list'>default_skip_list</span>
1870
1666
  <span class='const'>Set</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="#RAILS_SKIP_LIST-constant" title="EnhancedErrors::RAILS_SKIP_LIST (constant)">RAILS_SKIP_LIST</a></span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_merge'>merge</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="#RSPEC_SKIP_LIST-constant" title="EnhancedErrors::RSPEC_SKIP_LIST (constant)">RSPEC_SKIP_LIST</a></span></span><span class='rparen'>)</span>
@@ -1875,156 +1671,96 @@
1875
1671
  </div>
1876
1672
 
1877
1673
  <div class="method_details ">
1878
- <h3 class="signature " id="enhance!-class_method">
1879
-
1880
- .<strong>enhance!</strong>(enabled: true, debug: false, capture_events: default_capture_events, **options) {|void| ... } &#x21d2; <tt>void</tt>
1881
-
1882
-
1674
+ <h3 class="signature " id="enhance_exceptions!-class_method">
1883
1675
 
1884
-
1676
+ .<strong>enhance_exceptions!</strong>(enabled: true, debug: false, capture_events: nil, override_messages: false, **options, &amp;block) &#x21d2; <tt>Object</tt>
1885
1677
 
1886
- </h3><div class="docstring">
1887
- <div class="discussion">
1888
- <p class="note returns_void">This method returns an undefined value.</p>
1889
- <p>Enhances the exception handling by setting up tracing and configuration options.</p>
1890
1678
 
1891
-
1892
- </div>
1893
- </div>
1894
- <div class="tags">
1895
- <p class="tag_title">Parameters:</p>
1896
- <ul class="param">
1897
-
1898
- <li>
1899
-
1900
- <span class='name'>enabled</span>
1901
-
1902
-
1903
- <span class='type'>(<tt>Boolean</tt>)</span>
1904
-
1905
-
1906
- <em class="default">(defaults to: <tt>true</tt>)</em>
1907
-
1908
-
1909
- &mdash;
1910
- <div class='inline'>
1911
- <p>Whether to enable EnhancedErrors.</p>
1912
- </div>
1913
-
1914
- </li>
1915
-
1916
- <li>
1917
-
1918
- <span class='name'>debug</span>
1919
-
1920
-
1921
- <span class='type'>(<tt>Boolean</tt>)</span>
1922
-
1923
-
1924
- <em class="default">(defaults to: <tt>false</tt>)</em>
1925
-
1926
-
1927
- &mdash;
1928
- <div class='inline'>
1929
- <p>Whether to enable debug mode.</p>
1930
- </div>
1931
-
1932
- </li>
1933
-
1934
- <li>
1935
-
1936
- <span class='name'>options</span>
1937
-
1938
-
1939
- <span class='type'>(<tt>Hash</tt>)</span>
1940
-
1941
-
1942
-
1943
- &mdash;
1944
- <div class='inline'>
1945
- <p>Additional configuration options.</p>
1946
- </div>
1947
-
1948
- </li>
1949
1679
 
1950
- </ul>
1951
1680
 
1952
- <p class="tag_title">Yields:</p>
1953
- <ul class="yield">
1954
1681
 
1955
- <li>
1956
-
1957
-
1958
- <span class='type'>(<tt>void</tt>)</span>
1959
-
1960
-
1961
-
1962
- &mdash;
1963
- <div class='inline'>
1964
- <p>A block for additional configuration.</p>
1965
- </div>
1966
-
1967
- </li>
1968
-
1969
- </ul>
1970
-
1971
- </div><table class="source_code">
1682
+ </h3><table class="source_code">
1972
1683
  <tr>
1973
1684
  <td>
1974
1685
  <pre class="lines">
1975
1686
 
1976
1687
 
1977
- 164
1978
- 165
1979
- 166
1980
- 167
1981
- 168
1982
- 169
1983
- 170
1984
- 171
1985
- 172
1986
- 173
1987
- 174
1988
- 175
1989
- 176
1990
- 177
1991
- 178
1992
- 179
1993
- 180
1994
- 181
1995
- 182
1996
- 183
1997
- 184
1998
- 185
1999
- 186
2000
- 187
2001
- 188
2002
- 189
2003
- 190
2004
- 191
2005
- 192
2006
- 193
2007
- 194
2008
- 195</pre>
1688
+ 120
1689
+ 121
1690
+ 122
1691
+ 123
1692
+ 124
1693
+ 125
1694
+ 126
1695
+ 127
1696
+ 128
1697
+ 129
1698
+ 130
1699
+ 131
1700
+ 132
1701
+ 133
1702
+ 134
1703
+ 135
1704
+ 136
1705
+ 137
1706
+ 138
1707
+ 139
1708
+ 140
1709
+ 141
1710
+ 142
1711
+ 143
1712
+ 144
1713
+ 145
1714
+ 146
1715
+ 147
1716
+ 148
1717
+ 149
1718
+ 150
1719
+ 151
1720
+ 152
1721
+ 153
1722
+ 154
1723
+ 155
1724
+ 156
1725
+ 157
1726
+ 158
1727
+ 159
1728
+ 160
1729
+ 161
1730
+ 162
1731
+ 163
1732
+ 164
1733
+ 165
1734
+ 166
1735
+ 167</pre>
2009
1736
  </td>
2010
1737
  <td>
2011
- <pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line 164</span>
1738
+ <pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line 120</span>
1739
+
1740
+ <span class='kw'>def</span> <span class='id identifier rubyid_enhance_exceptions!'>enhance_exceptions!</span><span class='lparen'>(</span><span class='label'>enabled:</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='label'>debug:</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='label'>capture_events:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>override_messages:</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='op'>**</span><span class='id identifier rubyid_options'>options</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
1741
+ <span class='id identifier rubyid_require_relative'>require_relative</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>enhanced/exception</span><span class='tstring_end'>&#39;</span></span>
2012
1742
 
2013
- <span class='kw'>def</span> <span class='id identifier rubyid_enhance!'>enhance!</span><span class='lparen'>(</span><span class='label'>enabled:</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='label'>debug:</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='label'>capture_events:</span> <span class='id identifier rubyid_default_capture_events'>default_capture_events</span><span class='comma'>,</span> <span class='op'>**</span><span class='id identifier rubyid_options'>options</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
2014
- <span class='id identifier rubyid_capture_events'>capture_events</span> <span class='op'>=</span> <span class='const'>Array</span><span class='lparen'>(</span><span class='id identifier rubyid_capture_events'>capture_events</span><span class='rparen'>)</span>
2015
1743
  <span class='ivar'>@output_format</span> <span class='op'>=</span> <span class='kw'>nil</span>
2016
1744
  <span class='ivar'>@eligible_for_capture</span> <span class='op'>=</span> <span class='kw'>nil</span>
2017
1745
  <span class='ivar'>@original_global_variables</span> <span class='op'>=</span> <span class='kw'>nil</span>
1746
+ <span class='ivar'>@override_messages</span> <span class='op'>=</span> <span class='id identifier rubyid_override_messages'>override_messages</span>
1747
+
2018
1748
  <span class='kw'>if</span> <span class='id identifier rubyid_enabled'>enabled</span> <span class='op'>==</span> <span class='kw'>false</span>
2019
1749
  <span class='ivar'>@original_global_variables</span> <span class='op'>=</span> <span class='kw'>nil</span>
2020
1750
  <span class='ivar'>@enabled</span> <span class='op'>=</span> <span class='kw'>false</span>
2021
- <span class='ivar'>@trace</span><span class='period'>.</span><span class='id identifier rubyid_disable'>disable</span> <span class='kw'>if</span> <span class='ivar'>@trace</span>
1751
+ <span class='ivar'>@trace</span><span class='op'>&amp;.</span><span class='id identifier rubyid_disable'>disable</span>
1752
+ <span class='ivar'>@trace</span> <span class='op'>=</span> <span class='kw'>nil</span>
2022
1753
  <span class='kw'>else</span>
1754
+ <span class='comment'># if there&#39;s an old one, disable it before replacing it
1755
+ </span> <span class='comment'># this seems to actually matter, although it seems like it
1756
+ </span> <span class='comment'># shouldn&#39;t
1757
+ </span> <span class='ivar'>@trace</span><span class='op'>&amp;.</span><span class='id identifier rubyid_disable'>disable</span>
1758
+ <span class='ivar'>@trace</span> <span class='op'>=</span> <span class='kw'>nil</span>
1759
+
2023
1760
  <span class='ivar'>@enabled</span> <span class='op'>=</span> <span class='kw'>true</span>
2024
1761
  <span class='ivar'>@debug</span> <span class='op'>=</span> <span class='id identifier rubyid_debug'>debug</span>
2025
1762
  <span class='ivar'>@original_global_variables</span> <span class='op'>=</span> <span class='id identifier rubyid_global_variables'>global_variables</span>
2026
1763
 
2027
- <span class='id identifier rubyid_validate_and_set_capture_events'>validate_and_set_capture_events</span><span class='lparen'>(</span><span class='id identifier rubyid_capture_events'>capture_events</span><span class='rparen'>)</span>
2028
1764
  <span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span><span class='op'>|</span>
2029
1765
  <span class='id identifier rubyid_setter_method'>setter_method</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_key'>key</span><span class='embexpr_end'>}</span><span class='tstring_content'>=</span><span class='tstring_end'>&quot;</span></span>
2030
1766
  <span class='kw'>if</span> <span class='id identifier rubyid_respond_to?'>respond_to?</span><span class='lparen'>(</span><span class='id identifier rubyid_setter_method'>setter_method</span><span class='rparen'>)</span>
@@ -2032,14 +1768,21 @@
2032
1768
  <span class='kw'>elsif</span> <span class='id identifier rubyid_respond_to?'>respond_to?</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='rparen'>)</span>
2033
1769
  <span class='id identifier rubyid_send'>send</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span>
2034
1770
  <span class='kw'>else</span>
2035
- <span class='comment'># Ignore unknown options or handle as needed
1771
+ <span class='comment'># Ignore unknown options
2036
1772
  </span> <span class='kw'>end</span>
2037
1773
  <span class='kw'>end</span>
2038
1774
 
2039
1775
  <span class='ivar'>@config_block</span> <span class='op'>=</span> <span class='id identifier rubyid_block_given?'>block_given?</span> <span class='op'>?</span> <span class='id identifier rubyid_block'>block</span> <span class='op'>:</span> <span class='kw'>nil</span>
2040
1776
  <span class='id identifier rubyid_instance_eval'>instance_eval</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='ivar'>@config_block</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='ivar'>@config_block</span>
2041
1777
 
2042
- <span class='id identifier rubyid_start_tracing'>start_tracing</span>
1778
+ <span class='id identifier rubyid_validate_and_set_capture_events'>validate_and_set_capture_events</span><span class='lparen'>(</span><span class='id identifier rubyid_capture_events'>capture_events</span><span class='rparen'>)</span>
1779
+
1780
+ <span class='id identifier rubyid_events'>events</span> <span class='op'>=</span> <span class='ivar'>@capture_events</span> <span class='op'>?</span> <span class='ivar'>@capture_events</span><span class='period'>.</span><span class='id identifier rubyid_to_a'>to_a</span> <span class='op'>:</span> <span class='id identifier rubyid_default_capture_events'>default_capture_events</span>
1781
+ <span class='ivar'>@trace</span> <span class='op'>=</span> <span class='const'>TracePoint</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_events'>events</span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_tp'>tp</span><span class='op'>|</span>
1782
+ <span class='id identifier rubyid_handle_tracepoint_event'>handle_tracepoint_event</span><span class='lparen'>(</span><span class='id identifier rubyid_tp'>tp</span><span class='rparen'>)</span>
1783
+ <span class='kw'>end</span>
1784
+
1785
+ <span class='ivar'>@trace</span><span class='period'>.</span><span class='id identifier rubyid_enable'>enable</span>
2043
1786
  <span class='kw'>end</span>
2044
1787
  <span class='kw'>end</span></pre>
2045
1788
  </td>
@@ -2050,107 +1793,60 @@
2050
1793
  <div class="method_details ">
2051
1794
  <h3 class="signature " id="format-class_method">
2052
1795
 
2053
- .<strong>format</strong>(captured_bindings = [], output_format = get_default_format_for_environment) &#x21d2; <tt>String</tt>
2054
-
2055
-
2056
-
2057
-
1796
+ .<strong>format</strong>(captured_binding_infos = [], output_format = get_default_format_for_environment) &#x21d2; <tt>Object</tt>
2058
1797
 
2059
- </h3><div class="docstring">
2060
- <div class="discussion">
2061
-
2062
- <p>Formats the captured binding information into a string based on the specified format.</p>
2063
-
2064
1798
 
2065
- </div>
2066
- </div>
2067
- <div class="tags">
2068
- <p class="tag_title">Parameters:</p>
2069
- <ul class="param">
2070
-
2071
- <li>
2072
-
2073
- <span class='name'>captured_bindings</span>
2074
-
2075
-
2076
- <span class='type'>(<tt>Array&lt;Hash&gt;</tt>)</span>
2077
-
2078
-
2079
- <em class="default">(defaults to: <tt>[]</tt>)</em>
2080
-
2081
-
2082
- &mdash;
2083
- <div class='inline'>
2084
- <p>The array of captured binding information.</p>
2085
- </div>
2086
-
2087
- </li>
2088
-
2089
- <li>
2090
-
2091
- <span class='name'>output_format</span>
2092
-
2093
-
2094
- <span class='type'>(<tt>Symbol</tt>)</span>
2095
-
2096
-
2097
- <em class="default">(defaults to: <tt>get_default_format_for_environment</tt>)</em>
2098
-
2099
-
2100
- &mdash;
2101
- <div class='inline'>
2102
- <p>The format to use (:json, :plaintext, :terminal).</p>
2103
- </div>
2104
-
2105
- </li>
2106
1799
 
2107
- </ul>
2108
1800
 
2109
- <p class="tag_title">Returns:</p>
2110
- <ul class="return">
2111
-
2112
- <li>
2113
-
2114
-
2115
- <span class='type'>(<tt>String</tt>)</span>
2116
-
2117
-
2118
-
2119
- &mdash;
2120
- <div class='inline'>
2121
- <p>The formatted exception message.</p>
2122
- </div>
2123
-
2124
- </li>
2125
1801
 
2126
- </ul>
2127
-
2128
- </div><table class="source_code">
1802
+ </h3><table class="source_code">
2129
1803
  <tr>
2130
1804
  <td>
2131
1805
  <pre class="lines">
2132
1806
 
2133
1807
 
2134
- 254
2135
- 255
2136
- 256
2137
- 257
2138
- 258
2139
- 259
2140
- 260
2141
- 261
2142
- 262</pre>
1808
+ 300
1809
+ 301
1810
+ 302
1811
+ 303
1812
+ 304
1813
+ 305
1814
+ 306
1815
+ 307
1816
+ 308
1817
+ 309
1818
+ 310
1819
+ 311
1820
+ 312
1821
+ 313
1822
+ 314
1823
+ 315
1824
+ 316
1825
+ 317
1826
+ 318
1827
+ 319</pre>
2143
1828
  </td>
2144
1829
  <td>
2145
- <pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line 254</span>
1830
+ <pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line 300</span>
1831
+
1832
+ <span class='kw'>def</span> <span class='id identifier rubyid_format'>format</span><span class='lparen'>(</span><span class='id identifier rubyid_captured_binding_infos'>captured_binding_infos</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='id identifier rubyid_output_format'>output_format</span> <span class='op'>=</span> <span class='id identifier rubyid_get_default_format_for_environment'>get_default_format_for_environment</span><span class='rparen'>)</span>
1833
+ <span class='kw'>return</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_end'>&#39;</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_captured_binding_infos'>captured_binding_infos</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='op'>||</span> <span class='id identifier rubyid_captured_binding_infos'>captured_binding_infos</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
1834
+
1835
+ <span class='comment'># If captured_binding_infos is already an array, use it directly; otherwise, wrap it in an array.
1836
+ </span> <span class='id identifier rubyid_binding_infos'>binding_infos</span> <span class='op'>=</span> <span class='id identifier rubyid_captured_binding_infos'>captured_binding_infos</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Array</span><span class='rparen'>)</span> <span class='op'>?</span> <span class='id identifier rubyid_captured_binding_infos'>captured_binding_infos</span> <span class='op'>:</span> <span class='lbracket'>[</span><span class='id identifier rubyid_captured_binding_infos'>captured_binding_infos</span><span class='rbracket'>]</span>
1837
+
1838
+ <span class='id identifier rubyid_result'>result</span> <span class='op'>=</span> <span class='id identifier rubyid_binding_infos_array_to_string'>binding_infos_array_to_string</span><span class='lparen'>(</span><span class='id identifier rubyid_binding_infos'>binding_infos</span><span class='comma'>,</span> <span class='id identifier rubyid_output_format'>output_format</span><span class='rparen'>)</span>
2146
1839
 
2147
- <span class='kw'>def</span> <span class='id identifier rubyid_format'>format</span><span class='lparen'>(</span><span class='id identifier rubyid_captured_bindings'>captured_bindings</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='id identifier rubyid_output_format'>output_format</span> <span class='op'>=</span> <span class='id identifier rubyid_get_default_format_for_environment'>get_default_format_for_environment</span><span class='rparen'>)</span>
2148
- <span class='id identifier rubyid_result'>result</span> <span class='op'>=</span> <span class='id identifier rubyid_binding_infos_array_to_string'>binding_infos_array_to_string</span><span class='lparen'>(</span><span class='id identifier rubyid_captured_bindings'>captured_bindings</span><span class='comma'>,</span> <span class='id identifier rubyid_output_format'>output_format</span><span class='rparen'>)</span>
2149
1840
  <span class='kw'>if</span> <span class='ivar'>@on_format_hook</span>
2150
- <span class='id identifier rubyid_result'>result</span> <span class='op'>=</span> <span class='ivar'>@on_format_hook</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span><span class='lparen'>(</span><span class='id identifier rubyid_result'>result</span><span class='rparen'>)</span>
1841
+ <span class='kw'>begin</span>
1842
+ <span class='id identifier rubyid_result'>result</span> <span class='op'>=</span> <span class='ivar'>@on_format_hook</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span><span class='lparen'>(</span><span class='id identifier rubyid_result'>result</span><span class='rparen'>)</span>
1843
+ <span class='kw'>rescue</span>
1844
+ <span class='id identifier rubyid_result'>result</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_end'>&#39;</span></span>
1845
+ <span class='kw'>end</span>
2151
1846
  <span class='kw'>else</span>
2152
1847
  <span class='id identifier rubyid_result'>result</span> <span class='op'>=</span> <span class='id identifier rubyid_default_on_format'>default_on_format</span><span class='lparen'>(</span><span class='id identifier rubyid_result'>result</span><span class='rparen'>)</span>
2153
1848
  <span class='kw'>end</span>
1849
+
2154
1850
  <span class='id identifier rubyid_result'>result</span>
2155
1851
  <span class='kw'>end</span></pre>
2156
1852
  </td>
@@ -2161,66 +1857,37 @@
2161
1857
  <div class="method_details ">
2162
1858
  <h3 class="signature " id="get_default_format_for_environment-class_method">
2163
1859
 
2164
- .<strong>get_default_format_for_environment</strong> &#x21d2; <tt>Symbol</tt>
1860
+ .<strong>get_default_format_for_environment</strong> &#x21d2; <tt>Object</tt>
2165
1861
 
2166
1862
 
2167
1863
 
2168
1864
 
2169
1865
 
2170
- </h3><div class="docstring">
2171
- <div class="discussion">
2172
-
2173
- <p>Determines the default output format based on the current environment.</p>
2174
-
2175
-
2176
- </div>
2177
- </div>
2178
- <div class="tags">
2179
-
2180
- <p class="tag_title">Returns:</p>
2181
- <ul class="return">
2182
-
2183
- <li>
2184
-
2185
-
2186
- <span class='type'>(<tt>Symbol</tt>)</span>
2187
-
2188
-
2189
-
2190
- &mdash;
2191
- <div class='inline'>
2192
- <p>The default format (:json, :plaintext, :terminal).</p>
2193
- </div>
2194
-
2195
- </li>
2196
-
2197
- </ul>
2198
-
2199
- </div><table class="source_code">
1866
+ </h3><table class="source_code">
2200
1867
  <tr>
2201
1868
  <td>
2202
1869
  <pre class="lines">
2203
1870
 
2204
1871
 
2205
- 289
2206
- 290
2207
- 291
2208
- 292
2209
- 293
2210
- 294
2211
- 295
2212
- 296
2213
- 297
2214
- 298
2215
- 299
2216
- 300
2217
- 301
2218
- 302
2219
- 303
2220
- 304</pre>
1872
+ 329
1873
+ 330
1874
+ 331
1875
+ 332
1876
+ 333
1877
+ 334
1878
+ 335
1879
+ 336
1880
+ 337
1881
+ 338
1882
+ 339
1883
+ 340
1884
+ 341
1885
+ 342
1886
+ 343
1887
+ 344</pre>
2221
1888
  </td>
2222
1889
  <td>
2223
- <pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line 289</span>
1890
+ <pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line 329</span>
2224
1891
 
2225
1892
  <span class='kw'>def</span> <span class='id identifier rubyid_get_default_format_for_environment'>get_default_format_for_environment</span>
2226
1893
  <span class='kw'>return</span> <span class='ivar'>@output_format</span> <span class='kw'>unless</span> <span class='ivar'>@output_format</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
@@ -2246,77 +1913,28 @@
2246
1913
  <div class="method_details ">
2247
1914
  <h3 class="signature " id="on_capture-class_method">
2248
1915
 
2249
- .<strong>on_capture</strong> {|binding_info| ... } &#x21d2; <tt>Proc</tt>
2250
-
2251
-
1916
+ .<strong>on_capture</strong>(&amp;block) &#x21d2; <tt>Object</tt>
2252
1917
 
2253
1918
 
2254
1919
 
2255
- </h3><div class="docstring">
2256
- <div class="discussion">
2257
-
2258
- <p>Sets or retrieves the hook to modify binding information upon capture.</p>
2259
1920
 
2260
-
2261
- </div>
2262
- </div>
2263
- <div class="tags">
2264
-
2265
- <p class="tag_title">Yield Parameters:</p>
2266
- <ul class="yieldparam">
2267
-
2268
- <li>
2269
-
2270
- <span class='name'>binding_info</span>
2271
-
2272
-
2273
- <span class='type'>(<tt>Hash</tt>)</span>
2274
-
2275
-
2276
-
2277
- &mdash;
2278
- <div class='inline'>
2279
- <p>The binding information captured.</p>
2280
- </div>
2281
-
2282
- </li>
2283
-
2284
- </ul>
2285
- <p class="tag_title">Returns:</p>
2286
- <ul class="return">
2287
-
2288
- <li>
2289
-
2290
-
2291
- <span class='type'>(<tt>Proc</tt>)</span>
2292
-
2293
-
2294
-
2295
- &mdash;
2296
- <div class='inline'>
2297
- <p>The current on_capture hook.</p>
2298
- </div>
2299
-
2300
- </li>
2301
1921
 
2302
- </ul>
2303
-
2304
- </div><table class="source_code">
1922
+ </h3><table class="source_code">
2305
1923
  <tr>
2306
1924
  <td>
2307
1925
  <pre class="lines">
2308
1926
 
2309
1927
 
2310
- 213
2311
- 214
2312
- 215
2313
- 216
2314
- 217
2315
- 218
2316
- 219</pre>
1928
+ 276
1929
+ 277
1930
+ 278
1931
+ 279
1932
+ 280
1933
+ 281
1934
+ 282</pre>
2317
1935
  </td>
2318
1936
  <td>
2319
- <pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line 213</span>
1937
+ <pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line 276</span>
2320
1938
 
2321
1939
  <span class='kw'>def</span> <span class='id identifier rubyid_on_capture'>on_capture</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
2322
1940
  <span class='kw'>if</span> <span class='id identifier rubyid_block_given?'>block_given?</span>
@@ -2333,76 +1951,95 @@
2333
1951
  <div class="method_details ">
2334
1952
  <h3 class="signature " id="on_capture=-class_method">
2335
1953
 
2336
- .<strong>on_capture=</strong>(value) &#x21d2; <tt>Proc</tt>
1954
+ .<strong>on_capture=</strong>(value) &#x21d2; <tt>Object</tt>
2337
1955
 
2338
1956
 
2339
1957
 
2340
1958
 
2341
1959
 
2342
- </h3><div class="docstring">
2343
- <div class="discussion">
2344
-
2345
- <p>Sets the on_capture hook.</p>
1960
+ </h3><table class="source_code">
1961
+ <tr>
1962
+ <td>
1963
+ <pre class="lines">
2346
1964
 
2347
1965
 
2348
- </div>
1966
+ 284
1967
+ 285
1968
+ 286</pre>
1969
+ </td>
1970
+ <td>
1971
+ <pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line 284</span>
1972
+
1973
+ <span class='kw'>def</span> <span class='id identifier rubyid_on_capture='>on_capture=</span><span class='lparen'>(</span><span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span>
1974
+ <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_on_capture_hook'>on_capture_hook</span> <span class='op'>=</span> <span class='id identifier rubyid_value'>value</span>
1975
+ <span class='kw'>end</span></pre>
1976
+ </td>
1977
+ </tr>
1978
+ </table>
2349
1979
  </div>
2350
- <div class="tags">
2351
- <p class="tag_title">Parameters:</p>
2352
- <ul class="param">
1980
+
1981
+ <div class="method_details ">
1982
+ <h3 class="signature " id="on_format-class_method">
2353
1983
 
2354
- <li>
2355
-
2356
- <span class='name'>value</span>
2357
-
2358
-
2359
- <span class='type'>(<tt>Proc</tt>)</span>
2360
-
2361
-
2362
-
2363
- &mdash;
2364
- <div class='inline'>
2365
- <p>The proc to set as the on_capture hook.</p>
2366
- </div>
2367
-
2368
- </li>
1984
+ .<strong>on_format</strong>(&amp;block) &#x21d2; <tt>Object</tt>
2369
1985
 
2370
- </ul>
2371
1986
 
2372
- <p class="tag_title">Returns:</p>
2373
- <ul class="return">
2374
1987
 
2375
- <li>
2376
-
2377
-
2378
- <span class='type'>(<tt>Proc</tt>)</span>
2379
-
2380
-
2381
-
2382
- &mdash;
2383
- <div class='inline'>
2384
- <p>The newly set on_capture hook.</p>
1988
+
1989
+
1990
+ </h3><table class="source_code">
1991
+ <tr>
1992
+ <td>
1993
+ <pre class="lines">
1994
+
1995
+
1996
+ 288
1997
+ 289
1998
+ 290
1999
+ 291
2000
+ 292
2001
+ 293
2002
+ 294</pre>
2003
+ </td>
2004
+ <td>
2005
+ <pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line 288</span>
2006
+
2007
+ <span class='kw'>def</span> <span class='id identifier rubyid_on_format'>on_format</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
2008
+ <span class='kw'>if</span> <span class='id identifier rubyid_block_given?'>block_given?</span>
2009
+ <span class='ivar'>@on_format_hook</span> <span class='op'>=</span> <span class='id identifier rubyid_block'>block</span>
2010
+ <span class='kw'>else</span>
2011
+ <span class='ivar'>@on_format_hook</span> <span class='op'>||=</span> <span class='id identifier rubyid_method'>method</span><span class='lparen'>(</span><span class='symbol'>:default_on_format</span><span class='rparen'>)</span>
2012
+ <span class='kw'>end</span>
2013
+ <span class='kw'>end</span></pre>
2014
+ </td>
2015
+ </tr>
2016
+ </table>
2385
2017
  </div>
2386
-
2387
- </li>
2018
+
2019
+ <div class="method_details ">
2020
+ <h3 class="signature " id="on_format=-class_method">
2021
+
2022
+ .<strong>on_format=</strong>(value) &#x21d2; <tt>Object</tt>
2023
+
2024
+
2388
2025
 
2389
- </ul>
2390
2026
 
2391
- </div><table class="source_code">
2027
+
2028
+ </h3><table class="source_code">
2392
2029
  <tr>
2393
2030
  <td>
2394
2031
  <pre class="lines">
2395
2032
 
2396
2033
 
2397
- 225
2398
- 226
2399
- 227</pre>
2034
+ 296
2035
+ 297
2036
+ 298</pre>
2400
2037
  </td>
2401
2038
  <td>
2402
- <pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line 225</span>
2039
+ <pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line 296</span>
2403
2040
 
2404
- <span class='kw'>def</span> <span class='id identifier rubyid_on_capture='>on_capture=</span><span class='lparen'>(</span><span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span>
2405
- <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_on_capture_hook'>on_capture_hook</span> <span class='op'>=</span> <span class='id identifier rubyid_value'>value</span>
2041
+ <span class='kw'>def</span> <span class='id identifier rubyid_on_format='>on_format=</span><span class='lparen'>(</span><span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span>
2042
+ <span class='ivar'>@on_format_hook</span> <span class='op'>=</span> <span class='id identifier rubyid_value'>value</span>
2406
2043
  <span class='kw'>end</span></pre>
2407
2044
  </td>
2408
2045
  </tr>
@@ -2410,9 +2047,9 @@
2410
2047
  </div>
2411
2048
 
2412
2049
  <div class="method_details ">
2413
- <h3 class="signature " id="on_format-class_method">
2050
+ <h3 class="signature " id="override_exception_message-class_method">
2414
2051
 
2415
- .<strong>on_format</strong> {|formatted_string| ... } &#x21d2; <tt>Proc</tt>
2052
+ .<strong>override_exception_message</strong>(exception, binding_or_bindings) &#x21d2; <tt>Object</tt>
2416
2053
 
2417
2054
 
2418
2055
 
@@ -2421,51 +2058,13 @@
2421
2058
  </h3><div class="docstring">
2422
2059
  <div class="discussion">
2423
2060
 
2424
- <p>Sets or retrieves the hook to modify formatted exception messages.</p>
2061
+ <p>takes an exception and bindings, calculates the variables message and modifies the exceptions .message to display the variables</p>
2425
2062
 
2426
2063
 
2427
2064
  </div>
2428
2065
  </div>
2429
2066
  <div class="tags">
2430
2067
 
2431
- <p class="tag_title">Yield Parameters:</p>
2432
- <ul class="yieldparam">
2433
-
2434
- <li>
2435
-
2436
- <span class='name'>formatted_string</span>
2437
-
2438
-
2439
- <span class='type'>(<tt>String</tt>)</span>
2440
-
2441
-
2442
-
2443
- &mdash;
2444
- <div class='inline'>
2445
- <p>The formatted exception message.</p>
2446
- </div>
2447
-
2448
- </li>
2449
-
2450
- </ul>
2451
- <p class="tag_title">Returns:</p>
2452
- <ul class="return">
2453
-
2454
- <li>
2455
-
2456
-
2457
- <span class='type'>(<tt>Proc</tt>)</span>
2458
-
2459
-
2460
-
2461
- &mdash;
2462
- <div class='inline'>
2463
- <p>The current on_format hook.</p>
2464
- </div>
2465
-
2466
- </li>
2467
-
2468
- </ul>
2469
2068
 
2470
2069
  </div><table class="source_code">
2471
2070
  <tr>
@@ -2473,23 +2072,31 @@
2473
2072
  <pre class="lines">
2474
2073
 
2475
2074
 
2476
- 233
2477
- 234
2478
- 235
2479
- 236
2480
- 237
2481
- 238
2482
- 239</pre>
2075
+ 104
2076
+ 105
2077
+ 106
2078
+ 107
2079
+ 108
2080
+ 109
2081
+ 110
2082
+ 111
2083
+ 112
2084
+ 113
2085
+ 114</pre>
2483
2086
  </td>
2484
2087
  <td>
2485
- <pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line 233</span>
2486
-
2487
- <span class='kw'>def</span> <span class='id identifier rubyid_on_format'>on_format</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
2488
- <span class='kw'>if</span> <span class='id identifier rubyid_block_given?'>block_given?</span>
2489
- <span class='ivar'>@on_format_hook</span> <span class='op'>=</span> <span class='id identifier rubyid_block'>block</span>
2490
- <span class='kw'>else</span>
2491
- <span class='ivar'>@on_format_hook</span> <span class='op'>||=</span> <span class='id identifier rubyid_method'>method</span><span class='lparen'>(</span><span class='symbol'>:default_on_format</span><span class='rparen'>)</span>
2088
+ <pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line 104</span>
2089
+
2090
+ <span class='kw'>def</span> <span class='id identifier rubyid_override_exception_message'>override_exception_message</span><span class='lparen'>(</span><span class='id identifier rubyid_exception'>exception</span><span class='comma'>,</span> <span class='id identifier rubyid_binding_or_bindings'>binding_or_bindings</span><span class='rparen'>)</span>
2091
+ <span class='comment'># Ensure binding_or_bindings is always an array for compatibility
2092
+ </span> <span class='kw'>return</span> <span class='id identifier rubyid_exception'>exception</span> <span class='kw'>if</span> <span class='id identifier rubyid_binding_or_bindings'>binding_or_bindings</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='op'>||</span> <span class='id identifier rubyid_binding_or_bindings'>binding_or_bindings</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span> <span class='op'>||</span> <span class='id identifier rubyid_exception'>exception</span><span class='period'>.</span><span class='id identifier rubyid_respond_to?'>respond_to?</span><span class='lparen'>(</span><span class='symbol'>:unaltered_message</span><span class='rparen'>)</span>
2093
+ <span class='id identifier rubyid_variable_str'>variable_str</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="" title="EnhancedErrors (class)">EnhancedErrors</a></span></span><span class='period'>.</span><span class='id identifier rubyid_format'><span class='object_link'><a href="#format-class_method" title="EnhancedErrors.format (method)">format</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_binding_or_bindings'>binding_or_bindings</span><span class='rparen'>)</span>
2094
+ <span class='id identifier rubyid_message_str'>message_str</span> <span class='op'>=</span> <span class='id identifier rubyid_exception'>exception</span><span class='period'>.</span><span class='id identifier rubyid_message'>message</span>
2095
+ <span class='id identifier rubyid_exception'>exception</span><span class='period'>.</span><span class='id identifier rubyid_define_singleton_method'>define_singleton_method</span><span class='lparen'>(</span><span class='symbol'>:unaltered_message</span><span class='rparen'>)</span> <span class='lbrace'>{</span> <span class='id identifier rubyid_message_str'>message_str</span> <span class='rbrace'>}</span>
2096
+ <span class='id identifier rubyid_exception'>exception</span><span class='period'>.</span><span class='id identifier rubyid_define_singleton_method'>define_singleton_method</span><span class='lparen'>(</span><span class='symbol'>:message</span><span class='rparen'>)</span> <span class='kw'>do</span>
2097
+ <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_message_str'>message_str</span><span class='embexpr_end'>}</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_variable_str'>variable_str</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span>
2492
2098
  <span class='kw'>end</span>
2099
+ <span class='id identifier rubyid_exception'>exception</span>
2493
2100
  <span class='kw'>end</span></pre>
2494
2101
  </td>
2495
2102
  </tr>
@@ -2497,9 +2104,9 @@
2497
2104
  </div>
2498
2105
 
2499
2106
  <div class="method_details ">
2500
- <h3 class="signature " id="on_format=-class_method">
2107
+ <h3 class="signature " id="running_in_ci?-class_method">
2501
2108
 
2502
- .<strong>on_format=</strong>(value) &#x21d2; <tt>Proc</tt>
2109
+ .<strong>running_in_ci?</strong> &#x21d2; <tt>Boolean</tt>
2503
2110
 
2504
2111
 
2505
2112
 
@@ -2508,47 +2115,20 @@
2508
2115
  </h3><div class="docstring">
2509
2116
  <div class="discussion">
2510
2117
 
2511
- <p>Sets the on_format hook.</p>
2512
-
2513
2118
 
2514
2119
  </div>
2515
2120
  </div>
2516
2121
  <div class="tags">
2517
- <p class="tag_title">Parameters:</p>
2518
- <ul class="param">
2519
-
2520
- <li>
2521
-
2522
- <span class='name'>value</span>
2523
-
2524
-
2525
- <span class='type'>(<tt>Proc</tt>)</span>
2526
-
2527
-
2528
-
2529
- &mdash;
2530
- <div class='inline'>
2531
- <p>The proc to set as the on_format hook.</p>
2532
- </div>
2533
-
2534
- </li>
2535
2122
 
2536
- </ul>
2537
-
2538
2123
  <p class="tag_title">Returns:</p>
2539
2124
  <ul class="return">
2540
2125
 
2541
2126
  <li>
2542
2127
 
2543
2128
 
2544
- <span class='type'>(<tt>Proc</tt>)</span>
2545
-
2129
+ <span class='type'>(<tt>Boolean</tt>)</span>
2546
2130
 
2547
2131
 
2548
- &mdash;
2549
- <div class='inline'>
2550
- <p>The newly set on_format hook.</p>
2551
- </div>
2552
2132
 
2553
2133
  </li>
2554
2134
 
@@ -2560,15 +2140,35 @@
2560
2140
  <pre class="lines">
2561
2141
 
2562
2142
 
2563
- 245
2564
- 246
2565
- 247</pre>
2143
+ 346
2144
+ 347
2145
+ 348
2146
+ 349
2147
+ 350
2148
+ 351
2149
+ 352
2150
+ 353
2151
+ 354
2152
+ 355
2153
+ 356
2154
+ 357
2155
+ 358</pre>
2566
2156
  </td>
2567
2157
  <td>
2568
- <pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line 245</span>
2158
+ <pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line 346</span>
2569
2159
 
2570
- <span class='kw'>def</span> <span class='id identifier rubyid_on_format='>on_format=</span><span class='lparen'>(</span><span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span>
2571
- <span class='ivar'>@on_format_hook</span> <span class='op'>=</span> <span class='id identifier rubyid_value'>value</span>
2160
+ <span class='kw'>def</span> <span class='id identifier rubyid_running_in_ci?'>running_in_ci?</span>
2161
+ <span class='kw'>return</span> <span class='ivar'>@running_in_ci</span> <span class='kw'>if</span> <span class='kw'>defined?</span><span class='lparen'>(</span><span class='ivar'>@running_in_ci</span><span class='rparen'>)</span>
2162
+ <span class='id identifier rubyid_ci_env_vars'>ci_env_vars</span> <span class='op'>=</span> <span class='lbrace'>{</span>
2163
+ <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>CI</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='const'>ENV</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>CI</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='comma'>,</span>
2164
+ <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>JENKINS</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='const'>ENV</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>JENKINS</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='comma'>,</span>
2165
+ <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>GITHUB_ACTIONS</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='const'>ENV</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>GITHUB_ACTIONS</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='comma'>,</span>
2166
+ <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>CIRCLECI</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='const'>ENV</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>CIRCLECI</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='comma'>,</span>
2167
+ <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>TRAVIS</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='const'>ENV</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>TRAVIS</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='comma'>,</span>
2168
+ <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>APPVEYOR</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='const'>ENV</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>APPVEYOR</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='comma'>,</span>
2169
+ <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>GITLAB_CI</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='const'>ENV</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>GITLAB_CI</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span>
2170
+ <span class='rbrace'>}</span>
2171
+ <span class='ivar'>@running_in_ci</span> <span class='op'>=</span> <span class='id identifier rubyid_ci_env_vars'>ci_env_vars</span><span class='period'>.</span><span class='id identifier rubyid_any?'>any?</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid__'>_</span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span><span class='op'>|</span> <span class='id identifier rubyid_value'>value</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='period'>.</span><span class='id identifier rubyid_downcase'>downcase</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>true</span><span class='tstring_end'>&#39;</span></span> <span class='rbrace'>}</span>
2572
2172
  <span class='kw'>end</span></pre>
2573
2173
  </td>
2574
2174
  </tr>
@@ -2576,78 +2176,85 @@
2576
2176
  </div>
2577
2177
 
2578
2178
  <div class="method_details ">
2579
- <h3 class="signature " id="running_in_ci?-class_method">
2179
+ <h3 class="signature " id="safe_prepend_module-class_method">
2580
2180
 
2581
- .<strong>running_in_ci?</strong> &#x21d2; <tt>Boolean</tt>
2181
+ .<strong>safe_prepend_module</strong>(target_class, mod) &#x21d2; <tt>Object</tt>
2582
2182
 
2583
2183
 
2584
2184
 
2585
2185
 
2586
2186
 
2587
- </h3><div class="docstring">
2588
- <div class="discussion">
2589
-
2590
- <p>Checks if the code is running in a Continuous Integration (CI) environment.</p>
2187
+ </h3><table class="source_code">
2188
+ <tr>
2189
+ <td>
2190
+ <pre class="lines">
2591
2191
 
2592
2192
 
2593
- </div>
2193
+ 169
2194
+ 170
2195
+ 171
2196
+ 172
2197
+ 173
2198
+ 174
2199
+ 175
2200
+ 176</pre>
2201
+ </td>
2202
+ <td>
2203
+ <pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line 169</span>
2204
+
2205
+ <span class='kw'>def</span> <span class='id identifier rubyid_safe_prepend_module'>safe_prepend_module</span><span class='lparen'>(</span><span class='id identifier rubyid_target_class'>target_class</span><span class='comma'>,</span> <span class='id identifier rubyid_mod'>mod</span><span class='rparen'>)</span>
2206
+ <span class='kw'>if</span> <span class='kw'>defined?</span><span class='lparen'>(</span><span class='id identifier rubyid_target_class'>target_class</span><span class='rparen'>)</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_target_class'>target_class</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Module</span><span class='rparen'>)</span>
2207
+ <span class='id identifier rubyid_target_class'>target_class</span><span class='period'>.</span><span class='id identifier rubyid_prepend'>prepend</span><span class='lparen'>(</span><span class='id identifier rubyid_mod'>mod</span><span class='rparen'>)</span>
2208
+ <span class='kw'>true</span>
2209
+ <span class='kw'>else</span>
2210
+ <span class='kw'>false</span>
2211
+ <span class='kw'>end</span>
2212
+ <span class='kw'>end</span></pre>
2213
+ </td>
2214
+ </tr>
2215
+ </table>
2594
2216
  </div>
2595
- <div class="tags">
2217
+
2218
+ <div class="method_details ">
2219
+ <h3 class="signature " id="safely_prepend_rspec_custom_failure_message-class_method">
2596
2220
 
2597
- <p class="tag_title">Returns:</p>
2598
- <ul class="return">
2221
+ .<strong>safely_prepend_rspec_custom_failure_message</strong> &#x21d2; <tt>Object</tt>
2599
2222
 
2600
- <li>
2601
-
2602
-
2603
- <span class='type'>(<tt>Boolean</tt>)</span>
2604
-
2605
-
2606
-
2607
- &mdash;
2608
- <div class='inline'>
2609
- <p>‘true` if running in CI, otherwise `false`.</p>
2610
- </div>
2611
-
2612
- </li>
2223
+
2613
2224
 
2614
- </ul>
2615
2225
 
2616
- </div><table class="source_code">
2226
+
2227
+ </h3><table class="source_code">
2617
2228
  <tr>
2618
2229
  <td>
2619
2230
  <pre class="lines">
2620
2231
 
2621
2232
 
2622
- 309
2623
- 310
2624
- 311
2625
- 312
2626
- 313
2627
- 314
2628
- 315
2629
- 316
2630
- 317
2631
- 318
2632
- 319
2633
- 320
2634
- 321</pre>
2233
+ 178
2234
+ 179
2235
+ 180
2236
+ 181
2237
+ 182
2238
+ 183
2239
+ 184
2240
+ 185
2241
+ 186
2242
+ 187
2243
+ 188</pre>
2635
2244
  </td>
2636
2245
  <td>
2637
- <pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line 309</span>
2246
+ <pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line 178</span>
2638
2247
 
2639
- <span class='kw'>def</span> <span class='id identifier rubyid_running_in_ci?'>running_in_ci?</span>
2640
- <span class='kw'>return</span> <span class='ivar'>@running_in_ci</span> <span class='kw'>if</span> <span class='kw'>defined?</span><span class='lparen'>(</span><span class='ivar'>@running_in_ci</span><span class='rparen'>)</span>
2641
- <span class='id identifier rubyid_ci_env_vars'>ci_env_vars</span> <span class='op'>=</span> <span class='lbrace'>{</span>
2642
- <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>CI</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='const'>ENV</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>CI</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='comma'>,</span>
2643
- <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>JENKINS</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='const'>ENV</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>JENKINS</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='comma'>,</span>
2644
- <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>GITHUB_ACTIONS</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='const'>ENV</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>GITHUB_ACTIONS</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='comma'>,</span>
2645
- <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>CIRCLECI</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='const'>ENV</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>CIRCLECI</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='comma'>,</span>
2646
- <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>TRAVIS</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='const'>ENV</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>TRAVIS</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='comma'>,</span>
2647
- <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>APPVEYOR</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='const'>ENV</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>APPVEYOR</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='comma'>,</span>
2648
- <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>GITLAB_CI</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='const'>ENV</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>GITLAB_CI</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span>
2649
- <span class='rbrace'>}</span>
2650
- <span class='ivar'>@running_in_ci</span> <span class='op'>=</span> <span class='id identifier rubyid_ci_env_vars'>ci_env_vars</span><span class='period'>.</span><span class='id identifier rubyid_any?'>any?</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid__'>_</span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span><span class='op'>|</span> <span class='id identifier rubyid_value'>value</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='period'>.</span><span class='id identifier rubyid_downcase'>downcase</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>true</span><span class='tstring_end'>&#39;</span></span> <span class='rbrace'>}</span>
2248
+ <span class='kw'>def</span> <span class='id identifier rubyid_safely_prepend_rspec_custom_failure_message'>safely_prepend_rspec_custom_failure_message</span>
2249
+ <span class='kw'>return</span> <span class='kw'>if</span> <span class='ivar'>@rspec_failure_message_loaded</span>
2250
+ <span class='kw'>if</span> <span class='kw'>defined?</span><span class='lparen'>(</span><span class='const'>RSpec</span><span class='op'>::</span><span class='const'>Core</span><span class='op'>::</span><span class='const'>Example</span><span class='rparen'>)</span>
2251
+ <span class='const'>RSpec</span><span class='op'>::</span><span class='const'>Core</span><span class='op'>::</span><span class='const'>Example</span><span class='period'>.</span><span class='id identifier rubyid_prepend'>prepend</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="Enhanced.html" title="Enhanced (module)">Enhanced</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Enhanced/Integrations.html" title="Enhanced::Integrations (module)">Integrations</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Enhanced/Integrations/RSpecErrorFailureMessage.html" title="Enhanced::Integrations::RSpecErrorFailureMessage (module)">RSpecErrorFailureMessage</a></span></span><span class='rparen'>)</span>
2252
+ <span class='ivar'>@rspec_failure_message_loaded</span> <span class='op'>=</span> <span class='kw'>true</span>
2253
+ <span class='kw'>else</span>
2254
+
2255
+ <span class='kw'>end</span>
2256
+ <span class='kw'>rescue</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_e'>e</span>
2257
+ <span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Failed </span><span class='tstring_end'>&quot;</span></span>
2651
2258
  <span class='kw'>end</span></pre>
2652
2259
  </td>
2653
2260
  </tr>
@@ -2655,83 +2262,142 @@
2655
2262
  </div>
2656
2263
 
2657
2264
  <div class="method_details ">
2658
- <h3 class="signature " id="validate_binding_format-class_method">
2265
+ <h3 class="signature " id="start_rspec_binding_capture-class_method">
2659
2266
 
2660
- .<strong>validate_binding_format</strong>(binding_info) &#x21d2; <tt>Hash</tt><sup>?</sup>
2267
+ .<strong>start_rspec_binding_capture</strong> &#x21d2; <tt>Object</tt>
2661
2268
 
2662
2269
 
2663
2270
 
2664
2271
 
2665
2272
 
2666
- </h3><div class="docstring">
2667
- <div class="discussion">
2668
-
2669
- <p>Validates the format of the captured binding information.</p>
2273
+ </h3><table class="source_code">
2274
+ <tr>
2275
+ <td>
2276
+ <pre class="lines">
2670
2277
 
2671
2278
 
2672
- </div>
2279
+ 190
2280
+ 191
2281
+ 192
2282
+ 193
2283
+ 194
2284
+ 195
2285
+ 196
2286
+ 197
2287
+ 198
2288
+ 199
2289
+ 200
2290
+ 201
2291
+ 202
2292
+ 203
2293
+ 204
2294
+ 205
2295
+ 206
2296
+ 207
2297
+ 208
2298
+ 209
2299
+ 210
2300
+ 211
2301
+ 212
2302
+ 213</pre>
2303
+ </td>
2304
+ <td>
2305
+ <pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line 190</span>
2306
+
2307
+ <span class='kw'>def</span> <span class='id identifier rubyid_start_rspec_binding_capture'>start_rspec_binding_capture</span>
2308
+ <span class='ivar'>@rspec_example_binding</span> <span class='op'>=</span> <span class='kw'>nil</span>
2309
+
2310
+ <span class='comment'># In the Exception binding infos, I observed that re-setting
2311
+ </span> <span class='comment'># the tracepoint without disabling it seemed to accumulate traces
2312
+ </span> <span class='comment'># in the test suite where things are disabled and re-enabled often.
2313
+ </span> <span class='ivar'>@rspec_tracepoint</span><span class='op'>&amp;.</span><span class='id identifier rubyid_disable'>disable</span>
2314
+ <span class='ivar'>@rspec_tracepoint</span> <span class='op'>=</span> <span class='kw'>nil</span>
2315
+
2316
+ <span class='ivar'>@rspec_tracepoint</span> <span class='op'>=</span> <span class='const'>TracePoint</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='symbol'>:b_return</span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_tp'>tp</span><span class='op'>|</span>
2317
+ <span class='comment'># This is super-kluge-y and should be replaced with... something TBD
2318
+ </span>
2319
+ <span class='comment'># fixes cases where class and name are screwed up or overridden
2320
+ </span> <span class='id identifier rubyid_name'>name</span> <span class='op'>=</span> <span class='id identifier rubyid_determine_object_name'>determine_object_name</span><span class='lparen'>(</span><span class='id identifier rubyid_tp'>tp</span><span class='rparen'>)</span>
2321
+
2322
+ <span class='kw'>if</span> <span class='id identifier rubyid_name'>name</span> <span class='op'>=~</span> <span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>RSpec::ExampleGroups::[A-Z0-9]+.*</span><span class='regexp_end'>/</span></span> <span class='op'>&amp;&amp;</span>
2323
+ <span class='id identifier rubyid_tp'>tp</span><span class='period'>.</span><span class='id identifier rubyid_method_id'>method_id</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='op'>&amp;&amp;</span>
2324
+ <span class='op'>!</span><span class='lparen'>(</span><span class='id identifier rubyid_tp'>tp</span><span class='period'>.</span><span class='id identifier rubyid_path'>path</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span> <span class='op'>=~</span> <span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>rspec</span><span class='regexp_end'>/</span></span><span class='rparen'>)</span> <span class='op'>&amp;&amp;</span>
2325
+ <span class='id identifier rubyid_tp'>tp</span><span class='period'>.</span><span class='id identifier rubyid_path'>path</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span> <span class='op'>=~</span> <span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>_spec\.rb$</span><span class='regexp_end'>/</span></span>
2326
+ <span class='ivar'>@rspec_example_binding</span> <span class='op'>=</span> <span class='id identifier rubyid_tp'>tp</span><span class='period'>.</span><span class='id identifier rubyid_binding'>binding</span>
2327
+ <span class='kw'>end</span>
2328
+ <span class='kw'>end</span>
2329
+ <span class='ivar'>@rspec_tracepoint</span><span class='period'>.</span><span class='id identifier rubyid_enable'>enable</span>
2330
+ <span class='kw'>end</span></pre>
2331
+ </td>
2332
+ </tr>
2333
+ </table>
2673
2334
  </div>
2674
- <div class="tags">
2675
- <p class="tag_title">Parameters:</p>
2676
- <ul class="param">
2335
+
2336
+ <div class="method_details ">
2337
+ <h3 class="signature " id="stop_rspec_binding_capture-class_method">
2677
2338
 
2678
- <li>
2679
-
2680
- <span class='name'>binding_info</span>
2681
-
2682
-
2683
- <span class='type'>(<tt>Hash</tt>)</span>
2684
-
2685
-
2686
-
2687
- &mdash;
2688
- <div class='inline'>
2689
- <p>The binding information to validate.</p>
2690
- </div>
2691
-
2692
- </li>
2339
+ .<strong>stop_rspec_binding_capture</strong> &#x21d2; <tt>Object</tt>
2693
2340
 
2694
- </ul>
2695
2341
 
2696
- <p class="tag_title">Returns:</p>
2697
- <ul class="return">
2698
2342
 
2699
- <li>
2700
-
2701
-
2702
- <span class='type'>(<tt>Hash</tt>, <tt>nil</tt>)</span>
2703
-
2704
-
2705
-
2706
- &mdash;
2707
- <div class='inline'>
2708
- <p>The validated binding information or ‘nil` if invalid.</p>
2343
+
2344
+
2345
+ </h3><table class="source_code">
2346
+ <tr>
2347
+ <td>
2348
+ <pre class="lines">
2349
+
2350
+
2351
+ 215
2352
+ 216
2353
+ 217
2354
+ 218
2355
+ 219
2356
+ 220
2357
+ 221</pre>
2358
+ </td>
2359
+ <td>
2360
+ <pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line 215</span>
2361
+
2362
+ <span class='kw'>def</span> <span class='id identifier rubyid_stop_rspec_binding_capture'>stop_rspec_binding_capture</span>
2363
+ <span class='ivar'>@rspec_tracepoint</span><span class='op'>&amp;.</span><span class='id identifier rubyid_disable'>disable</span>
2364
+ <span class='ivar'>@rspec_tracepoint</span> <span class='op'>=</span> <span class='kw'>nil</span>
2365
+ <span class='id identifier rubyid_binding_info'>binding_info</span> <span class='op'>=</span> <span class='id identifier rubyid_convert_binding_to_binding_info'>convert_binding_to_binding_info</span><span class='lparen'>(</span><span class='ivar'>@rspec_example_binding</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='ivar'>@rspec_example_binding</span>
2366
+ <span class='ivar'>@rspec_example_binding</span> <span class='op'>=</span> <span class='kw'>nil</span>
2367
+ <span class='id identifier rubyid_binding_info'>binding_info</span>
2368
+ <span class='kw'>end</span></pre>
2369
+ </td>
2370
+ </tr>
2371
+ </table>
2709
2372
  </div>
2710
-
2711
- </li>
2373
+
2374
+ <div class="method_details ">
2375
+ <h3 class="signature " id="validate_binding_format-class_method">
2376
+
2377
+ .<strong>validate_binding_format</strong>(binding_info) &#x21d2; <tt>Object</tt>
2712
2378
 
2713
- </ul>
2714
2379
 
2715
- </div><table class="source_code">
2380
+
2381
+
2382
+
2383
+ </h3><table class="source_code">
2716
2384
  <tr>
2717
2385
  <td>
2718
2386
  <pre class="lines">
2719
2387
 
2720
2388
 
2721
- 341
2722
- 342
2723
- 343
2724
- 344
2725
- 345
2726
- 346
2727
- 347</pre>
2389
+ 370
2390
+ 371
2391
+ 372
2392
+ 373
2393
+ 374
2394
+ 375</pre>
2728
2395
  </td>
2729
2396
  <td>
2730
- <pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line 341</span>
2397
+ <pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line 370</span>
2731
2398
 
2732
2399
  <span class='kw'>def</span> <span class='id identifier rubyid_validate_binding_format'>validate_binding_format</span><span class='lparen'>(</span><span class='id identifier rubyid_binding_info'>binding_info</span><span class='rparen'>)</span>
2733
2400
  <span class='kw'>unless</span> <span class='id identifier rubyid_binding_info'>binding_info</span><span class='period'>.</span><span class='id identifier rubyid_keys'>keys</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='symbol'>:capture_event</span><span class='rparen'>)</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_binding_info'>binding_info</span><span class='lbracket'>[</span><span class='symbol'>:variables</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Hash</span><span class='rparen'>)</span>
2734
- <span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Invalid binding_info format.</span><span class='tstring_end'>&quot;</span></span>
2735
2401
  <span class='kw'>return</span> <span class='kw'>nil</span>
2736
2402
  <span class='kw'>end</span>
2737
2403
  <span class='id identifier rubyid_binding_info'>binding_info</span>
@@ -2746,7 +2412,7 @@
2746
2412
  </div>
2747
2413
 
2748
2414
  <div id="footer">
2749
- Generated on Sun Nov 10 12:01:14 2024 by
2415
+ Generated on Mon Dec 9 19:51:26 2024 by
2750
2416
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
2751
2417
  0.9.37 (ruby-3.1.3).
2752
2418
  </div>