mr_loga_loga 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/release.yml +2 -2
- data/.gitignore +1 -0
- data/.yardopts +1 -0
- data/CHANGELOG.md +17 -0
- data/Gemfile.lock +7 -3
- data/README.md +4 -4
- data/docs/MrLogaLoga/Configuration.html +376 -0
- data/docs/MrLogaLoga/Context.html +628 -0
- data/docs/MrLogaLoga/Error.html +124 -0
- data/docs/MrLogaLoga/Extensions/LogrageExtension.html +305 -0
- data/docs/MrLogaLoga/Extensions/RailsExtension/LoggerPatch.html +322 -0
- data/docs/MrLogaLoga/Extensions/RailsExtension/ServerPatch.html +201 -0
- data/docs/MrLogaLoga/Extensions/RailsExtension.html +242 -0
- data/docs/MrLogaLoga/Extensions.html +117 -0
- data/docs/MrLogaLoga/Formatters/Json.html +350 -0
- data/docs/MrLogaLoga/Formatters/KeyValue.html +338 -0
- data/docs/MrLogaLoga/Formatters.html +117 -0
- data/docs/MrLogaLoga/InstanceMethods.html +350 -0
- data/docs/MrLogaLoga/Logger.html +618 -0
- data/docs/MrLogaLoga/LoggerProxy.html +319 -0
- data/docs/MrLogaLoga.html +374 -0
- data/docs/_config.yml +1 -0
- data/docs/_index.html +280 -0
- data/docs/class_list.html +51 -0
- data/docs/css/common.css +1 -0
- data/docs/css/full_list.css +58 -0
- data/docs/css/style.css +497 -0
- data/docs/file.README.html +255 -0
- data/docs/file_list.html +56 -0
- data/docs/frames.html +17 -0
- data/docs/index.html +255 -0
- data/docs/js/app.js +314 -0
- data/docs/js/full_list.js +216 -0
- data/docs/js/jquery.js +4 -0
- data/docs/method_list.html +283 -0
- data/docs/top-level-namespace.html +110 -0
- data/lib/mr_loga_loga/context.rb +10 -0
- data/lib/mr_loga_loga/extensions/{lograge_patch.rb → lograge.rb} +19 -6
- data/lib/mr_loga_loga/extensions/rails.rb +142 -0
- data/lib/mr_loga_loga/instance_methods.rb +5 -1
- data/lib/mr_loga_loga/logger.rb +3 -5
- data/lib/mr_loga_loga/version.rb +1 -1
- data/lib/mr_loga_loga.rb +3 -3
- data/mr_loga_loga.gemspec +3 -2
- metadata +53 -8
- data/lib/mr_loga_loga/extensions/active_support_logger_patch.rb +0 -94
@@ -0,0 +1,628 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6
|
+
<title>
|
7
|
+
Class: MrLogaLoga::Context
|
8
|
+
|
9
|
+
— Documentation by YARD 0.9.27
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="../css/style.css" type="text/css" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="../css/common.css" type="text/css" />
|
16
|
+
|
17
|
+
<script type="text/javascript">
|
18
|
+
pathId = "MrLogaLoga::Context";
|
19
|
+
relpath = '../';
|
20
|
+
</script>
|
21
|
+
|
22
|
+
|
23
|
+
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
24
|
+
|
25
|
+
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
|
26
|
+
|
27
|
+
|
28
|
+
</head>
|
29
|
+
<body>
|
30
|
+
<div class="nav_wrap">
|
31
|
+
<iframe id="nav" src="../class_list.html?1"></iframe>
|
32
|
+
<div id="resizer"></div>
|
33
|
+
</div>
|
34
|
+
|
35
|
+
<div id="main" tabindex="-1">
|
36
|
+
<div id="header">
|
37
|
+
<div id="menu">
|
38
|
+
|
39
|
+
<a href="../_index.html">Index (C)</a> »
|
40
|
+
<span class='title'><span class='object_link'><a href="../MrLogaLoga.html" title="MrLogaLoga (module)">MrLogaLoga</a></span></span>
|
41
|
+
»
|
42
|
+
<span class="title">Context</span>
|
43
|
+
|
44
|
+
</div>
|
45
|
+
|
46
|
+
<div id="search">
|
47
|
+
|
48
|
+
<a class="full_list_link" id="class_list_link"
|
49
|
+
href="../class_list.html">
|
50
|
+
|
51
|
+
<svg width="24" height="24">
|
52
|
+
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
53
|
+
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
54
|
+
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
55
|
+
</svg>
|
56
|
+
</a>
|
57
|
+
|
58
|
+
</div>
|
59
|
+
<div class="clear"></div>
|
60
|
+
</div>
|
61
|
+
|
62
|
+
<div id="content"><h1>Class: MrLogaLoga::Context
|
63
|
+
|
64
|
+
|
65
|
+
|
66
|
+
</h1>
|
67
|
+
<div class="box_info">
|
68
|
+
|
69
|
+
<dl>
|
70
|
+
<dt>Inherits:</dt>
|
71
|
+
<dd>
|
72
|
+
<span class="inheritName">Object</span>
|
73
|
+
|
74
|
+
<ul class="fullTree">
|
75
|
+
<li>Object</li>
|
76
|
+
|
77
|
+
<li class="next">MrLogaLoga::Context</li>
|
78
|
+
|
79
|
+
</ul>
|
80
|
+
<a href="#" class="inheritanceTree">show all</a>
|
81
|
+
|
82
|
+
</dd>
|
83
|
+
</dl>
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
<dl>
|
96
|
+
<dt>Defined in:</dt>
|
97
|
+
<dd>lib/mr_loga_loga/context.rb</dd>
|
98
|
+
</dl>
|
99
|
+
|
100
|
+
</div>
|
101
|
+
|
102
|
+
<h2>Overview</h2><div class="docstring">
|
103
|
+
<div class="discussion">
|
104
|
+
|
105
|
+
<h2 id="label-Description">Description</h2>
|
106
|
+
|
107
|
+
<p>This class provides a fluent interface to attach contextual information to log messages.</p>
|
108
|
+
|
109
|
+
|
110
|
+
</div>
|
111
|
+
</div>
|
112
|
+
<div class="tags">
|
113
|
+
|
114
|
+
|
115
|
+
</div>
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
|
122
|
+
|
123
|
+
<h2>
|
124
|
+
Instance Method Summary
|
125
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
126
|
+
</h2>
|
127
|
+
|
128
|
+
<ul class="summary">
|
129
|
+
|
130
|
+
<li class="public ">
|
131
|
+
<span class="summary_signature">
|
132
|
+
|
133
|
+
<a href="#add-instance_method" title="#add (instance method)">#<strong>add</strong>(severity, message = nil, **context) { ... } ⇒ Context </a>
|
134
|
+
|
135
|
+
|
136
|
+
|
137
|
+
(also: #log)
|
138
|
+
|
139
|
+
</span>
|
140
|
+
|
141
|
+
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
|
146
|
+
|
147
|
+
|
148
|
+
|
149
|
+
<span class="summary_desc"><div class='inline'>
|
150
|
+
<p>Log a message with the current context.</p>
|
151
|
+
</div></span>
|
152
|
+
|
153
|
+
</li>
|
154
|
+
|
155
|
+
|
156
|
+
<li class="public ">
|
157
|
+
<span class="summary_signature">
|
158
|
+
|
159
|
+
<a href="#context-instance_method" title="#context (instance method)">#<strong>context</strong>(context = {}) { ... } ⇒ Context </a>
|
160
|
+
|
161
|
+
|
162
|
+
|
163
|
+
</span>
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
|
168
|
+
|
169
|
+
|
170
|
+
|
171
|
+
|
172
|
+
|
173
|
+
<span class="summary_desc"><div class='inline'>
|
174
|
+
<p>Add a new context to the log message.</p>
|
175
|
+
</div></span>
|
176
|
+
|
177
|
+
</li>
|
178
|
+
|
179
|
+
|
180
|
+
<li class="public ">
|
181
|
+
<span class="summary_signature">
|
182
|
+
|
183
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(logger, context = {}) ⇒ Context </a>
|
184
|
+
|
185
|
+
|
186
|
+
|
187
|
+
</span>
|
188
|
+
|
189
|
+
|
190
|
+
<span class="note title constructor">constructor</span>
|
191
|
+
|
192
|
+
|
193
|
+
|
194
|
+
|
195
|
+
|
196
|
+
|
197
|
+
|
198
|
+
|
199
|
+
<span class="summary_desc"><div class='inline'>
|
200
|
+
<p>A new instance of Context.</p>
|
201
|
+
</div></span>
|
202
|
+
|
203
|
+
</li>
|
204
|
+
|
205
|
+
|
206
|
+
<li class="public ">
|
207
|
+
<span class="summary_signature">
|
208
|
+
|
209
|
+
<a href="#method_missing-instance_method" title="#method_missing (instance method)">#<strong>method_missing</strong>(symbol, *args, &block) ⇒ Object </a>
|
210
|
+
|
211
|
+
|
212
|
+
|
213
|
+
</span>
|
214
|
+
|
215
|
+
|
216
|
+
|
217
|
+
|
218
|
+
|
219
|
+
|
220
|
+
|
221
|
+
|
222
|
+
|
223
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
224
|
+
|
225
|
+
</li>
|
226
|
+
|
227
|
+
|
228
|
+
<li class="public ">
|
229
|
+
<span class="summary_signature">
|
230
|
+
|
231
|
+
<a href="#respond_to_missing%3F-instance_method" title="#respond_to_missing? (instance method)">#<strong>respond_to_missing?</strong>(name, include_private = false) ⇒ Boolean </a>
|
232
|
+
|
233
|
+
|
234
|
+
|
235
|
+
</span>
|
236
|
+
|
237
|
+
|
238
|
+
|
239
|
+
|
240
|
+
|
241
|
+
|
242
|
+
|
243
|
+
|
244
|
+
|
245
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
246
|
+
|
247
|
+
</li>
|
248
|
+
|
249
|
+
|
250
|
+
</ul>
|
251
|
+
|
252
|
+
|
253
|
+
<div id="constructor_details" class="method_details_list">
|
254
|
+
<h2>Constructor Details</h2>
|
255
|
+
|
256
|
+
<div class="method_details first">
|
257
|
+
<h3 class="signature first" id="initialize-instance_method">
|
258
|
+
|
259
|
+
#<strong>initialize</strong>(logger, context = {}) ⇒ <tt><span class='object_link'><a href="" title="MrLogaLoga::Context (class)">Context</a></span></tt>
|
260
|
+
|
261
|
+
|
262
|
+
|
263
|
+
|
264
|
+
|
265
|
+
</h3><div class="docstring">
|
266
|
+
<div class="discussion">
|
267
|
+
|
268
|
+
<p>Returns a new instance of Context.</p>
|
269
|
+
|
270
|
+
|
271
|
+
</div>
|
272
|
+
</div>
|
273
|
+
<div class="tags">
|
274
|
+
|
275
|
+
|
276
|
+
</div><table class="source_code">
|
277
|
+
<tr>
|
278
|
+
<td>
|
279
|
+
<pre class="lines">
|
280
|
+
|
281
|
+
|
282
|
+
10
|
283
|
+
11
|
284
|
+
12
|
285
|
+
13</pre>
|
286
|
+
</td>
|
287
|
+
<td>
|
288
|
+
<pre class="code"><span class="info file"># File 'lib/mr_loga_loga/context.rb', line 10</span>
|
289
|
+
|
290
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_logger'>logger</span><span class='comma'>,</span> <span class='id identifier rubyid_context'>context</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
291
|
+
<span class='ivar'>@logger</span> <span class='op'>=</span> <span class='id identifier rubyid_logger'>logger</span>
|
292
|
+
<span class='ivar'>@context</span> <span class='op'>=</span> <span class='id identifier rubyid_context'>context</span>
|
293
|
+
<span class='kw'>end</span></pre>
|
294
|
+
</td>
|
295
|
+
</tr>
|
296
|
+
</table>
|
297
|
+
</div>
|
298
|
+
|
299
|
+
</div>
|
300
|
+
<div id="method_missing_details" class="method_details_list">
|
301
|
+
<h2>Dynamic Method Handling</h2>
|
302
|
+
<p class="notice this">
|
303
|
+
This class handles dynamic methods through the <tt>method_missing</tt> method
|
304
|
+
|
305
|
+
</p>
|
306
|
+
|
307
|
+
<div class="method_details first">
|
308
|
+
<h3 class="signature first" id="method_missing-instance_method">
|
309
|
+
|
310
|
+
#<strong>method_missing</strong>(symbol, *args, &block) ⇒ <tt>Object</tt>
|
311
|
+
|
312
|
+
|
313
|
+
|
314
|
+
|
315
|
+
|
316
|
+
</h3><table class="source_code">
|
317
|
+
<tr>
|
318
|
+
<td>
|
319
|
+
<pre class="lines">
|
320
|
+
|
321
|
+
|
322
|
+
54
|
323
|
+
55
|
324
|
+
56
|
325
|
+
57
|
326
|
+
58</pre>
|
327
|
+
</td>
|
328
|
+
<td>
|
329
|
+
<pre class="code"><span class="info file"># File 'lib/mr_loga_loga/context.rb', line 54</span>
|
330
|
+
|
331
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_method_missing'>method_missing</span><span class='lparen'>(</span><span class='id identifier rubyid_symbol'>symbol</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='comma'>,</span> <span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
|
332
|
+
<span class='id identifier rubyid_context'>context</span> <span class='op'>=</span> <span class='id identifier rubyid_block'>block</span> <span class='op'>?</span> <span class='tlambda'>-></span> <span class='tlambeg'>{</span> <span class='lbrace'>{</span> <span class='id identifier rubyid_symbol'>symbol</span> <span class='op'>=></span> <span class='id identifier rubyid_block'>block</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span> <span class='rbrace'>}</span> <span class='rbrace'>}</span> <span class='op'>:</span> <span class='lbrace'>{</span> <span class='id identifier rubyid_symbol'>symbol</span> <span class='op'>=></span> <span class='id identifier rubyid_unwrap'>unwrap</span><span class='lparen'>(</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span> <span class='rbrace'>}</span>
|
333
|
+
<span class='ivar'>@context</span> <span class='op'>=</span> <span class='id identifier rubyid_merge_context'>merge_context</span><span class='lparen'>(</span><span class='ivar'>@context</span><span class='comma'>,</span> <span class='id identifier rubyid_context'>context</span><span class='rparen'>)</span>
|
334
|
+
<span class='kw'>self</span>
|
335
|
+
<span class='kw'>end</span></pre>
|
336
|
+
</td>
|
337
|
+
</tr>
|
338
|
+
</table>
|
339
|
+
</div>
|
340
|
+
|
341
|
+
</div>
|
342
|
+
|
343
|
+
|
344
|
+
<div id="instance_method_details" class="method_details_list">
|
345
|
+
<h2>Instance Method Details</h2>
|
346
|
+
|
347
|
+
|
348
|
+
<div class="method_details first">
|
349
|
+
<h3 class="signature first" id="add-instance_method">
|
350
|
+
|
351
|
+
#<strong>add</strong>(severity, message = nil, **context) { ... } ⇒ <tt><span class='object_link'><a href="" title="MrLogaLoga::Context (class)">Context</a></span></tt>
|
352
|
+
|
353
|
+
|
354
|
+
|
355
|
+
<span class="aliases">Also known as:
|
356
|
+
<span class="names"><span id='log-instance_method'>log</span></span>
|
357
|
+
</span>
|
358
|
+
|
359
|
+
|
360
|
+
|
361
|
+
</h3><div class="docstring">
|
362
|
+
<div class="discussion">
|
363
|
+
|
364
|
+
<p>Log a message with the current context</p>
|
365
|
+
|
366
|
+
|
367
|
+
</div>
|
368
|
+
</div>
|
369
|
+
<div class="tags">
|
370
|
+
<p class="tag_title">Parameters:</p>
|
371
|
+
<ul class="param">
|
372
|
+
|
373
|
+
<li>
|
374
|
+
|
375
|
+
<span class='name'>context</span>
|
376
|
+
|
377
|
+
|
378
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
379
|
+
|
380
|
+
|
381
|
+
|
382
|
+
—
|
383
|
+
<div class='inline'>
|
384
|
+
<p>the new context</p>
|
385
|
+
</div>
|
386
|
+
|
387
|
+
</li>
|
388
|
+
|
389
|
+
</ul>
|
390
|
+
|
391
|
+
<p class="tag_title">Yields:</p>
|
392
|
+
<ul class="yield">
|
393
|
+
|
394
|
+
<li>
|
395
|
+
|
396
|
+
|
397
|
+
<span class='type'></span>
|
398
|
+
|
399
|
+
|
400
|
+
|
401
|
+
|
402
|
+
<div class='inline'>
|
403
|
+
<p>the new context</p>
|
404
|
+
</div>
|
405
|
+
|
406
|
+
</li>
|
407
|
+
|
408
|
+
</ul>
|
409
|
+
<p class="tag_title">Returns:</p>
|
410
|
+
<ul class="return">
|
411
|
+
|
412
|
+
<li>
|
413
|
+
|
414
|
+
|
415
|
+
<span class='type'>(<tt><span class='object_link'><a href="" title="MrLogaLoga::Context (class)">Context</a></span></tt>)</span>
|
416
|
+
|
417
|
+
|
418
|
+
|
419
|
+
—
|
420
|
+
<div class='inline'>
|
421
|
+
<p>a new context object</p>
|
422
|
+
</div>
|
423
|
+
|
424
|
+
</li>
|
425
|
+
|
426
|
+
</ul>
|
427
|
+
|
428
|
+
</div><table class="source_code">
|
429
|
+
<tr>
|
430
|
+
<td>
|
431
|
+
<pre class="lines">
|
432
|
+
|
433
|
+
|
434
|
+
31
|
435
|
+
32
|
436
|
+
33
|
437
|
+
34
|
438
|
+
35
|
439
|
+
36
|
440
|
+
37
|
441
|
+
38
|
442
|
+
39</pre>
|
443
|
+
</td>
|
444
|
+
<td>
|
445
|
+
<pre class="code"><span class="info file"># File 'lib/mr_loga_loga/context.rb', line 31</span>
|
446
|
+
|
447
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_add'>add</span><span class='lparen'>(</span><span class='id identifier rubyid_severity'>severity</span><span class='comma'>,</span> <span class='id identifier rubyid_message'>message</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='op'>**</span><span class='id identifier rubyid_context'>context</span><span class='comma'>,</span> <span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
|
448
|
+
<span class='id identifier rubyid_severity'>severity</span> <span class='op'>||=</span> <span class='const'>UNKNOWN</span>
|
449
|
+
<span class='kw'>return</span> <span class='kw'>true</span> <span class='kw'>unless</span> <span class='ivar'>@logger</span><span class='period'>.</span><span class='id identifier rubyid_log?'>log?</span><span class='lparen'>(</span><span class='id identifier rubyid_severity'>severity</span><span class='rparen'>)</span>
|
450
|
+
|
451
|
+
<span class='id identifier rubyid_context'>context</span> <span class='op'>=</span> <span class='id identifier rubyid_merge_context'>merge_context</span><span class='lparen'>(</span><span class='ivar'>@context</span><span class='comma'>,</span> <span class='id identifier rubyid_context'>context</span><span class='rparen'>)</span>
|
452
|
+
<span class='id identifier rubyid_context'>context</span> <span class='op'>=</span> <span class='id identifier rubyid_context'>context</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span> <span class='kw'>if</span> <span class='id identifier rubyid_context'>context</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Proc</span><span class='rparen'>)</span>
|
453
|
+
|
454
|
+
<span class='ivar'>@logger</span><span class='period'>.</span><span class='id identifier rubyid_add'>add</span><span class='lparen'>(</span><span class='id identifier rubyid_severity'>severity</span><span class='comma'>,</span> <span class='id identifier rubyid_message'>message</span><span class='comma'>,</span> <span class='op'>**</span><span class='id identifier rubyid_context'>context</span><span class='comma'>,</span> <span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
|
455
|
+
<span class='kw'>end</span></pre>
|
456
|
+
</td>
|
457
|
+
</tr>
|
458
|
+
</table>
|
459
|
+
</div>
|
460
|
+
|
461
|
+
<div class="method_details ">
|
462
|
+
<h3 class="signature " id="context-instance_method">
|
463
|
+
|
464
|
+
#<strong>context</strong>(context = {}) { ... } ⇒ <tt><span class='object_link'><a href="" title="MrLogaLoga::Context (class)">Context</a></span></tt>
|
465
|
+
|
466
|
+
|
467
|
+
|
468
|
+
|
469
|
+
|
470
|
+
</h3><div class="docstring">
|
471
|
+
<div class="discussion">
|
472
|
+
|
473
|
+
<p>Add a new context to the log message</p>
|
474
|
+
|
475
|
+
|
476
|
+
</div>
|
477
|
+
</div>
|
478
|
+
<div class="tags">
|
479
|
+
<p class="tag_title">Parameters:</p>
|
480
|
+
<ul class="param">
|
481
|
+
|
482
|
+
<li>
|
483
|
+
|
484
|
+
<span class='name'>context</span>
|
485
|
+
|
486
|
+
|
487
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
488
|
+
|
489
|
+
|
490
|
+
<em class="default">(defaults to: <tt>{}</tt>)</em>
|
491
|
+
|
492
|
+
|
493
|
+
—
|
494
|
+
<div class='inline'>
|
495
|
+
<p>the new context</p>
|
496
|
+
</div>
|
497
|
+
|
498
|
+
</li>
|
499
|
+
|
500
|
+
</ul>
|
501
|
+
|
502
|
+
<p class="tag_title">Yields:</p>
|
503
|
+
<ul class="yield">
|
504
|
+
|
505
|
+
<li>
|
506
|
+
|
507
|
+
|
508
|
+
<span class='type'></span>
|
509
|
+
|
510
|
+
|
511
|
+
|
512
|
+
|
513
|
+
<div class='inline'>
|
514
|
+
<p>the new context</p>
|
515
|
+
</div>
|
516
|
+
|
517
|
+
</li>
|
518
|
+
|
519
|
+
</ul>
|
520
|
+
<p class="tag_title">Returns:</p>
|
521
|
+
<ul class="return">
|
522
|
+
|
523
|
+
<li>
|
524
|
+
|
525
|
+
|
526
|
+
<span class='type'>(<tt><span class='object_link'><a href="" title="MrLogaLoga::Context (class)">Context</a></span></tt>)</span>
|
527
|
+
|
528
|
+
|
529
|
+
|
530
|
+
—
|
531
|
+
<div class='inline'>
|
532
|
+
<p>a new context object</p>
|
533
|
+
</div>
|
534
|
+
|
535
|
+
</li>
|
536
|
+
|
537
|
+
</ul>
|
538
|
+
|
539
|
+
</div><table class="source_code">
|
540
|
+
<tr>
|
541
|
+
<td>
|
542
|
+
<pre class="lines">
|
543
|
+
|
544
|
+
|
545
|
+
20
|
546
|
+
21
|
547
|
+
22
|
548
|
+
23
|
549
|
+
24</pre>
|
550
|
+
</td>
|
551
|
+
<td>
|
552
|
+
<pre class="code"><span class="info file"># File 'lib/mr_loga_loga/context.rb', line 20</span>
|
553
|
+
|
554
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_context'>context</span><span class='lparen'>(</span><span class='id identifier rubyid_context'>context</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='comma'>,</span> <span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
|
555
|
+
<span class='ivar'>@context</span> <span class='op'>=</span> <span class='id identifier rubyid_merge_context'>merge_context</span><span class='lparen'>(</span><span class='ivar'>@context</span><span class='comma'>,</span> <span class='id identifier rubyid_context'>context</span><span class='rparen'>)</span>
|
556
|
+
<span class='ivar'>@context</span> <span class='op'>=</span> <span class='id identifier rubyid_merge_context'>merge_context</span><span class='lparen'>(</span><span class='ivar'>@context</span><span class='comma'>,</span> <span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
|
557
|
+
<span class='kw'>self</span>
|
558
|
+
<span class='kw'>end</span></pre>
|
559
|
+
</td>
|
560
|
+
</tr>
|
561
|
+
</table>
|
562
|
+
</div>
|
563
|
+
|
564
|
+
<div class="method_details ">
|
565
|
+
<h3 class="signature " id="respond_to_missing?-instance_method">
|
566
|
+
|
567
|
+
#<strong>respond_to_missing?</strong>(name, include_private = false) ⇒ <tt>Boolean</tt>
|
568
|
+
|
569
|
+
|
570
|
+
|
571
|
+
|
572
|
+
|
573
|
+
</h3><div class="docstring">
|
574
|
+
<div class="discussion">
|
575
|
+
|
576
|
+
|
577
|
+
</div>
|
578
|
+
</div>
|
579
|
+
<div class="tags">
|
580
|
+
|
581
|
+
<p class="tag_title">Returns:</p>
|
582
|
+
<ul class="return">
|
583
|
+
|
584
|
+
<li>
|
585
|
+
|
586
|
+
|
587
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
588
|
+
|
589
|
+
|
590
|
+
|
591
|
+
</li>
|
592
|
+
|
593
|
+
</ul>
|
594
|
+
|
595
|
+
</div><table class="source_code">
|
596
|
+
<tr>
|
597
|
+
<td>
|
598
|
+
<pre class="lines">
|
599
|
+
|
600
|
+
|
601
|
+
60
|
602
|
+
61
|
603
|
+
62</pre>
|
604
|
+
</td>
|
605
|
+
<td>
|
606
|
+
<pre class="code"><span class="info file"># File 'lib/mr_loga_loga/context.rb', line 60</span>
|
607
|
+
|
608
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_respond_to_missing?'>respond_to_missing?</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='id identifier rubyid_include_private'>include_private</span> <span class='op'>=</span> <span class='kw'>false</span><span class='rparen'>)</span>
|
609
|
+
<span class='kw'>super</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='id identifier rubyid_include_private'>include_private</span><span class='rparen'>)</span>
|
610
|
+
<span class='kw'>end</span></pre>
|
611
|
+
</td>
|
612
|
+
</tr>
|
613
|
+
</table>
|
614
|
+
</div>
|
615
|
+
|
616
|
+
</div>
|
617
|
+
|
618
|
+
</div>
|
619
|
+
|
620
|
+
<div id="footer">
|
621
|
+
Generated on Wed Jan 5 09:59:09 2022 by
|
622
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
623
|
+
0.9.27 (ruby-3.0.0).
|
624
|
+
</div>
|
625
|
+
|
626
|
+
</div>
|
627
|
+
</body>
|
628
|
+
</html>
|