patman 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGELOG.rdoc +3 -0
- data/README.rdoc +2 -2
- data/doc/Patman.html +539 -431
- data/doc/Patman/PatmanError.html +44 -43
- data/doc/Patman/PatmanFileError.html +44 -43
- data/doc/Patman/PatmanSearchError.html +44 -43
- data/doc/_index.html +28 -31
- data/doc/class_list.html +24 -31
- data/doc/css/full_list.css +32 -31
- data/doc/css/style.css +250 -93
- data/doc/file.CHANGELOG.html +33 -32
- data/doc/file.README.html +34 -36
- data/doc/file_list.html +29 -31
- data/doc/frames.html +7 -16
- data/doc/index.html +34 -36
- data/doc/js/app.js +147 -74
- data/doc/js/full_list.js +170 -135
- data/doc/method_list.html +241 -155
- data/doc/top-level-namespace.html +34 -36
- data/lib/patman.rb +32 -5
- data/lib/version.rb +1 -1
- data/test/test_patman.rb +24 -10
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 2f4f477debef3ba29862b8cd80a69f34e2be138efa271fff4ebf171903630c7d
|
4
|
+
data.tar.gz: ad9bc68723f9108d13ffa5badf8c446d983aa929ee53b1f5ec52e394f28c4eae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f7cd3310b356984aae17970df30743bf880b85d81c15226475fd7b030491a736f3076045aef2651a12cb9ebb57b3cfc6330dd58c8b86b614c463be201b51d562
|
7
|
+
data.tar.gz: 0abc497ab3ffb8790e034a7864ec25d8cedbd3da159ce968b0584cb91f8d2dd16f4aaa62792c70104fa15d674a9f3fc23b934fde26b1aae12fd96dbcb1d0b103
|
data/CHANGELOG.rdoc
CHANGED
data/README.rdoc
CHANGED
@@ -15,7 +15,7 @@ either with Regexp searches or with direct line numbers. The file
|
|
15
15
|
content is edited by adding, removing, or replacing lines. When all
|
16
16
|
edits are done, the updated file content is written to disk.
|
17
17
|
|
18
|
-
r = Patman.read( "edit_me.txt" )
|
18
|
+
r = Patman.read( "edit_me.txt" )
|
19
19
|
r.line 10
|
20
20
|
r.delete
|
21
21
|
r.write
|
@@ -106,7 +106,7 @@ before any editing commands have been applied.
|
|
106
106
|
r.write
|
107
107
|
|
108
108
|
|
109
|
-
== Testing
|
109
|
+
== Testing
|
110
110
|
|
111
111
|
Tests are executed with:
|
112
112
|
|
data/doc/Patman.html
CHANGED
@@ -1,12 +1,12 @@
|
|
1
|
-
<!DOCTYPE html
|
2
|
-
|
3
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
4
3
|
<head>
|
5
|
-
<meta
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6
6
|
<title>
|
7
7
|
Class: Patman
|
8
8
|
|
9
|
-
— Documentation by YARD 0.
|
9
|
+
— Documentation by YARD 0.9.16
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -15,9 +15,8 @@
|
|
15
15
|
<link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
|
16
16
|
|
17
17
|
<script type="text/javascript" charset="utf-8">
|
18
|
-
|
18
|
+
pathId = "Patman";
|
19
19
|
relpath = '';
|
20
|
-
framesUrl = "frames.html#!Patman.html";
|
21
20
|
</script>
|
22
21
|
|
23
22
|
|
@@ -28,51 +27,48 @@
|
|
28
27
|
|
29
28
|
</head>
|
30
29
|
<body>
|
31
|
-
<div
|
32
|
-
<
|
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">
|
33
38
|
|
34
39
|
<a href="_index.html">Index (P)</a> »
|
35
40
|
|
36
41
|
|
37
42
|
<span class="title">Patman</span>
|
38
43
|
|
39
|
-
|
40
|
-
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
41
44
|
</div>
|
42
45
|
|
43
|
-
|
46
|
+
<div id="search">
|
44
47
|
|
45
48
|
<a class="full_list_link" id="class_list_link"
|
46
49
|
href="class_list.html">
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
</a>
|
54
|
-
|
55
|
-
<a class="full_list_link" id="file_list_link"
|
56
|
-
href="file_list.html">
|
57
|
-
File List
|
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>
|
58
56
|
</a>
|
59
57
|
|
60
58
|
</div>
|
61
|
-
|
62
|
-
|
59
|
+
<div class="clear"></div>
|
60
|
+
</div>
|
63
61
|
|
64
|
-
|
65
|
-
|
66
|
-
<div id="content"><h1>Class: Patman
|
62
|
+
<div id="content"><h1>Class: Patman
|
67
63
|
|
68
64
|
|
69
65
|
|
70
66
|
</h1>
|
71
|
-
|
72
|
-
<dl class="box">
|
67
|
+
<div class="box_info">
|
73
68
|
|
74
|
-
|
75
|
-
<
|
69
|
+
<dl>
|
70
|
+
<dt>Inherits:</dt>
|
71
|
+
<dd>
|
76
72
|
<span class="inheritName">Object</span>
|
77
73
|
|
78
74
|
<ul class="fullTree">
|
@@ -83,23 +79,27 @@
|
|
83
79
|
</ul>
|
84
80
|
<a href="#" class="inheritanceTree">show all</a>
|
85
81
|
|
86
|
-
|
87
|
-
|
82
|
+
</dd>
|
83
|
+
</dl>
|
84
|
+
|
85
|
+
|
88
86
|
|
89
87
|
|
90
|
-
|
91
88
|
|
92
|
-
|
93
89
|
|
94
90
|
|
91
|
+
|
95
92
|
|
96
|
-
|
97
|
-
|
93
|
+
|
94
|
+
|
95
|
+
<dl>
|
96
|
+
<dt>Defined in:</dt>
|
97
|
+
<dd>lib/patman.rb<span class="defines">,<br />
|
98
98
|
lib/version.rb</span>
|
99
99
|
</dd>
|
100
|
+
</dl>
|
100
101
|
|
101
|
-
</
|
102
|
-
<div class="clear"></div>
|
102
|
+
</div>
|
103
103
|
|
104
104
|
<h2>Overview</h2><div class="docstring">
|
105
105
|
<div class="discussion">
|
@@ -124,14 +124,18 @@ also be used to extract information from files.</p>
|
|
124
124
|
|
125
125
|
</p>
|
126
126
|
|
127
|
-
<h2>Constant Summary</h2>
|
128
127
|
|
128
|
+
<h2>
|
129
|
+
Constant Summary
|
130
|
+
<small><a href="#" class="constants_summary_toggle">collapse</a></small>
|
131
|
+
</h2>
|
132
|
+
|
129
133
|
<dl class="constants">
|
130
134
|
|
131
135
|
<dt id="VERSION-constant" class="">VERSION =
|
132
136
|
|
133
137
|
</dt>
|
134
|
-
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>0.0.
|
138
|
+
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>0.0.4</span><span class='tstring_end'>"</span></span></pre></dd>
|
135
139
|
|
136
140
|
</dl>
|
137
141
|
|
@@ -139,13 +143,13 @@ also be used to extract information from files.</p>
|
|
139
143
|
|
140
144
|
|
141
145
|
|
142
|
-
<h2>Instance Attribute Summary <small
|
146
|
+
<h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
|
143
147
|
<ul class="summary">
|
144
148
|
|
145
149
|
<li class="public ">
|
146
150
|
<span class="summary_signature">
|
147
151
|
|
148
|
-
<a href="#marks-instance_method" title="#marks (instance method)"
|
152
|
+
<a href="#marks-instance_method" title="#marks (instance method)">#<strong>marks</strong> ⇒ Object </a>
|
149
153
|
|
150
154
|
|
151
155
|
|
@@ -177,7 +181,7 @@ also be used to extract information from files.</p>
|
|
177
181
|
|
178
182
|
<h2>
|
179
183
|
Class Method Summary
|
180
|
-
<small
|
184
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
181
185
|
</h2>
|
182
186
|
|
183
187
|
<ul class="summary">
|
@@ -185,7 +189,31 @@ also be used to extract information from files.</p>
|
|
185
189
|
<li class="public ">
|
186
190
|
<span class="summary_signature">
|
187
191
|
|
188
|
-
<a href="#
|
192
|
+
<a href="#edit-class_method" title="edit (class method)">.<strong>edit</strong>(file, &blk) ⇒ Object </a>
|
193
|
+
|
194
|
+
|
195
|
+
|
196
|
+
</span>
|
197
|
+
|
198
|
+
|
199
|
+
|
200
|
+
|
201
|
+
|
202
|
+
|
203
|
+
|
204
|
+
|
205
|
+
|
206
|
+
<span class="summary_desc"><div class='inline'>
|
207
|
+
<p>Edit file and also create it if it does not exist.</p>
|
208
|
+
</div></span>
|
209
|
+
|
210
|
+
</li>
|
211
|
+
|
212
|
+
|
213
|
+
<li class="public ">
|
214
|
+
<span class="summary_signature">
|
215
|
+
|
216
|
+
<a href="#read-class_method" title="read (class method)">.<strong>read</strong>(file) ⇒ Object </a>
|
189
217
|
|
190
218
|
|
191
219
|
|
@@ -209,7 +237,7 @@ also be used to extract information from files.</p>
|
|
209
237
|
<li class="public ">
|
210
238
|
<span class="summary_signature">
|
211
239
|
|
212
|
-
<a href="#version-class_method" title="version (class method)"
|
240
|
+
<a href="#version-class_method" title="version (class method)">.<strong>version</strong> ⇒ Object </a>
|
213
241
|
|
214
242
|
|
215
243
|
|
@@ -232,7 +260,7 @@ also be used to extract information from files.</p>
|
|
232
260
|
|
233
261
|
<h2>
|
234
262
|
Instance Method Summary
|
235
|
-
<small
|
263
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
236
264
|
</h2>
|
237
265
|
|
238
266
|
<ul class="summary">
|
@@ -240,7 +268,7 @@ also be used to extract information from files.</p>
|
|
240
268
|
<li class="public ">
|
241
269
|
<span class="summary_signature">
|
242
270
|
|
243
|
-
<a href="
|
271
|
+
<a href="#[]-instance_method" title="#[] (instance method)">#<strong>[]</strong>(range) ⇒ Object </a>
|
244
272
|
|
245
273
|
|
246
274
|
|
@@ -264,7 +292,7 @@ also be used to extract information from files.</p>
|
|
264
292
|
<li class="public ">
|
265
293
|
<span class="summary_signature">
|
266
294
|
|
267
|
-
<a href="#append-instance_method" title="#append (instance method)"
|
295
|
+
<a href="#append-instance_method" title="#append (instance method)">#<strong>append</strong>(text = nil) ⇒ Object </a>
|
268
296
|
|
269
297
|
|
270
298
|
|
@@ -288,7 +316,7 @@ also be used to extract information from files.</p>
|
|
288
316
|
<li class="public ">
|
289
317
|
<span class="summary_signature">
|
290
318
|
|
291
|
-
<a href="#blockline-instance_method" title="#blockline (instance method)"
|
319
|
+
<a href="#blockline-instance_method" title="#blockline (instance method)">#<strong>blockline</strong> ⇒ Object </a>
|
292
320
|
|
293
321
|
|
294
322
|
|
@@ -312,7 +340,7 @@ also be used to extract information from files.</p>
|
|
312
340
|
<li class="public ">
|
313
341
|
<span class="summary_signature">
|
314
342
|
|
315
|
-
<a href="#clear-instance_method" title="#clear (instance method)"
|
343
|
+
<a href="#clear-instance_method" title="#clear (instance method)">#<strong>clear</strong> ⇒ Object </a>
|
316
344
|
|
317
345
|
|
318
346
|
|
@@ -336,7 +364,7 @@ also be used to extract information from files.</p>
|
|
336
364
|
<li class="public ">
|
337
365
|
<span class="summary_signature">
|
338
366
|
|
339
|
-
<a href="#copy-instance_method" title="#copy (instance method)"
|
367
|
+
<a href="#copy-instance_method" title="#copy (instance method)">#<strong>copy</strong>(file) ⇒ Object </a>
|
340
368
|
|
341
369
|
|
342
370
|
|
@@ -360,7 +388,7 @@ also be used to extract information from files.</p>
|
|
360
388
|
<li class="public ">
|
361
389
|
<span class="summary_signature">
|
362
390
|
|
363
|
-
<a href="#delete-instance_method" title="#delete (instance method)"
|
391
|
+
<a href="#delete-instance_method" title="#delete (instance method)">#<strong>delete</strong>(count = 1) ⇒ Object </a>
|
364
392
|
|
365
393
|
|
366
394
|
|
@@ -384,7 +412,7 @@ also be used to extract information from files.</p>
|
|
384
412
|
<li class="public ">
|
385
413
|
<span class="summary_signature">
|
386
414
|
|
387
|
-
<a href="#do_all-instance_method" title="#do_all (instance method)"
|
415
|
+
<a href="#do_all-instance_method" title="#do_all (instance method)">#<strong>do_all</strong>(&blk) ⇒ Object </a>
|
388
416
|
|
389
417
|
|
390
418
|
|
@@ -408,7 +436,7 @@ also be used to extract information from files.</p>
|
|
408
436
|
<li class="public ">
|
409
437
|
<span class="summary_signature">
|
410
438
|
|
411
|
-
<a href="#do_for-instance_method" title="#do_for (instance method)"
|
439
|
+
<a href="#do_for-instance_method" title="#do_for (instance method)">#<strong>do_for</strong>(start, count, &blk) ⇒ Object </a>
|
412
440
|
|
413
441
|
|
414
442
|
|
@@ -432,7 +460,7 @@ also be used to extract information from files.</p>
|
|
432
460
|
<li class="public ">
|
433
461
|
<span class="summary_signature">
|
434
462
|
|
435
|
-
<a href="#do_range-instance_method" title="#do_range (instance method)"
|
463
|
+
<a href="#do_range-instance_method" title="#do_range (instance method)">#<strong>do_range</strong>(start, stop, &blk) ⇒ Object </a>
|
436
464
|
|
437
465
|
|
438
466
|
|
@@ -456,7 +484,7 @@ also be used to extract information from files.</p>
|
|
456
484
|
<li class="public ">
|
457
485
|
<span class="summary_signature">
|
458
486
|
|
459
|
-
<a href="#edit-instance_method" title="#edit (instance method)"
|
487
|
+
<a href="#edit-instance_method" title="#edit (instance method)">#<strong>edit</strong> ⇒ Object </a>
|
460
488
|
|
461
489
|
|
462
490
|
|
@@ -480,7 +508,7 @@ also be used to extract information from files.</p>
|
|
480
508
|
<li class="public ">
|
481
509
|
<span class="summary_signature">
|
482
510
|
|
483
|
-
<a href="#edited%3F-instance_method" title="#edited? (instance method)"
|
511
|
+
<a href="#edited%3F-instance_method" title="#edited? (instance method)">#<strong>edited?</strong> ⇒ Boolean </a>
|
484
512
|
|
485
513
|
|
486
514
|
|
@@ -504,7 +532,7 @@ also be used to extract information from files.</p>
|
|
504
532
|
<li class="public ">
|
505
533
|
<span class="summary_signature">
|
506
534
|
|
507
|
-
<a href="#excursion-instance_method" title="#excursion (instance method)"
|
535
|
+
<a href="#excursion-instance_method" title="#excursion (instance method)">#<strong>excursion</strong>(&blk) ⇒ Object </a>
|
508
536
|
|
509
537
|
|
510
538
|
|
@@ -528,7 +556,7 @@ also be used to extract information from files.</p>
|
|
528
556
|
<li class="public ">
|
529
557
|
<span class="summary_signature">
|
530
558
|
|
531
|
-
<a href="#filename-instance_method" title="#filename (instance method)"
|
559
|
+
<a href="#filename-instance_method" title="#filename (instance method)">#<strong>filename</strong> ⇒ Object </a>
|
532
560
|
|
533
561
|
|
534
562
|
|
@@ -552,7 +580,7 @@ also be used to extract information from files.</p>
|
|
552
580
|
<li class="public ">
|
553
581
|
<span class="summary_signature">
|
554
582
|
|
555
|
-
<a href="#find-instance_method" title="#find (instance method)"
|
583
|
+
<a href="#find-instance_method" title="#find (instance method)">#<strong>find</strong>(re_or_str, forward = true) ⇒ Object </a>
|
556
584
|
|
557
585
|
|
558
586
|
|
@@ -576,7 +604,7 @@ also be used to extract information from files.</p>
|
|
576
604
|
<li class="public ">
|
577
605
|
<span class="summary_signature">
|
578
606
|
|
579
|
-
<a href="#firstline-instance_method" title="#firstline (instance method)"
|
607
|
+
<a href="#firstline-instance_method" title="#firstline (instance method)">#<strong>firstline</strong> ⇒ Object </a>
|
580
608
|
|
581
609
|
|
582
610
|
|
@@ -600,7 +628,7 @@ also be used to extract information from files.</p>
|
|
600
628
|
<li class="public ">
|
601
629
|
<span class="summary_signature">
|
602
630
|
|
603
|
-
<a href="#get-instance_method" title="#get (instance method)"
|
631
|
+
<a href="#get-instance_method" title="#get (instance method)">#<strong>get</strong>(count = 1) ⇒ Object </a>
|
604
632
|
|
605
633
|
|
606
634
|
|
@@ -624,7 +652,7 @@ also be used to extract information from files.</p>
|
|
624
652
|
<li class="public ">
|
625
653
|
<span class="summary_signature">
|
626
654
|
|
627
|
-
<a href="#get_for-instance_method" title="#get_for (instance method)"
|
655
|
+
<a href="#get_for-instance_method" title="#get_for (instance method)">#<strong>get_for</strong>(start, count) ⇒ Object </a>
|
628
656
|
|
629
657
|
|
630
658
|
|
@@ -648,7 +676,7 @@ also be used to extract information from files.</p>
|
|
648
676
|
<li class="public ">
|
649
677
|
<span class="summary_signature">
|
650
678
|
|
651
|
-
<a href="#get_range-instance_method" title="#get_range (instance method)"
|
679
|
+
<a href="#get_range-instance_method" title="#get_range (instance method)">#<strong>get_range</strong>(start, stop) ⇒ Object </a>
|
652
680
|
|
653
681
|
|
654
682
|
|
@@ -672,7 +700,7 @@ also be used to extract information from files.</p>
|
|
672
700
|
<li class="public ">
|
673
701
|
<span class="summary_signature">
|
674
702
|
|
675
|
-
<a href="#initialize-instance_method" title="#initialize (instance method)"
|
703
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(file) ⇒ Patman </a>
|
676
704
|
|
677
705
|
|
678
706
|
|
@@ -698,7 +726,7 @@ also be used to extract information from files.</p>
|
|
698
726
|
<li class="public ">
|
699
727
|
<span class="summary_signature">
|
700
728
|
|
701
|
-
<a href="#insert-instance_method" title="#insert (instance method)"
|
729
|
+
<a href="#insert-instance_method" title="#insert (instance method)">#<strong>insert</strong>(text = nil) ⇒ Object </a>
|
702
730
|
|
703
731
|
|
704
732
|
|
@@ -722,7 +750,7 @@ also be used to extract information from files.</p>
|
|
722
750
|
<li class="public ">
|
723
751
|
<span class="summary_signature">
|
724
752
|
|
725
|
-
<a href="#insertfile-instance_method" title="#insertfile (instance method)"
|
753
|
+
<a href="#insertfile-instance_method" title="#insertfile (instance method)">#<strong>insertfile</strong>(file) ⇒ Object </a>
|
726
754
|
|
727
755
|
|
728
756
|
|
@@ -746,7 +774,7 @@ also be used to extract information from files.</p>
|
|
746
774
|
<li class="public ">
|
747
775
|
<span class="summary_signature">
|
748
776
|
|
749
|
-
<a href="#lastline-instance_method" title="#lastline (instance method)"
|
777
|
+
<a href="#lastline-instance_method" title="#lastline (instance method)">#<strong>lastline</strong> ⇒ Object </a>
|
750
778
|
|
751
779
|
|
752
780
|
|
@@ -770,7 +798,7 @@ also be used to extract information from files.</p>
|
|
770
798
|
<li class="public ">
|
771
799
|
<span class="summary_signature">
|
772
800
|
|
773
|
-
<a href="#length-instance_method" title="#length (instance method)"
|
801
|
+
<a href="#length-instance_method" title="#length (instance method)">#<strong>length</strong> ⇒ Object </a>
|
774
802
|
|
775
803
|
|
776
804
|
|
@@ -794,7 +822,7 @@ also be used to extract information from files.</p>
|
|
794
822
|
<li class="public ">
|
795
823
|
<span class="summary_signature">
|
796
824
|
|
797
|
-
<a href="#line-instance_method" title="#line (instance method)"
|
825
|
+
<a href="#line-instance_method" title="#line (instance method)">#<strong>line</strong>(arg = nil) ⇒ Object </a>
|
798
826
|
|
799
827
|
|
800
828
|
|
@@ -818,7 +846,7 @@ also be used to extract information from files.</p>
|
|
818
846
|
<li class="public ">
|
819
847
|
<span class="summary_signature">
|
820
848
|
|
821
|
-
<a href="#lines-instance_method" title="#lines (instance method)"
|
849
|
+
<a href="#lines-instance_method" title="#lines (instance method)">#<strong>lines</strong>(arg = nil) ⇒ Object </a>
|
822
850
|
|
823
851
|
|
824
852
|
|
@@ -842,7 +870,7 @@ also be used to extract information from files.</p>
|
|
842
870
|
<li class="public ">
|
843
871
|
<span class="summary_signature">
|
844
872
|
|
845
|
-
<a href="#mark-instance_method" title="#mark (instance method)"
|
873
|
+
<a href="#mark-instance_method" title="#mark (instance method)">#<strong>mark</strong>(tag = nil) ⇒ Object </a>
|
846
874
|
|
847
875
|
|
848
876
|
|
@@ -866,7 +894,7 @@ also be used to extract information from files.</p>
|
|
866
894
|
<li class="public ">
|
867
895
|
<span class="summary_signature">
|
868
896
|
|
869
|
-
<a href="#peek-instance_method" title="#peek (instance method)"
|
897
|
+
<a href="#peek-instance_method" title="#peek (instance method)">#<strong>peek</strong>(count = 0) ⇒ Object </a>
|
870
898
|
|
871
899
|
|
872
900
|
|
@@ -890,7 +918,7 @@ also be used to extract information from files.</p>
|
|
890
918
|
<li class="public ">
|
891
919
|
<span class="summary_signature">
|
892
920
|
|
893
|
-
<a href="#peek_ln-instance_method" title="#peek_ln (instance method)"
|
921
|
+
<a href="#peek_ln-instance_method" title="#peek_ln (instance method)">#<strong>peek_ln</strong>(count = 0) ⇒ Object </a>
|
894
922
|
|
895
923
|
|
896
924
|
|
@@ -914,7 +942,7 @@ also be used to extract information from files.</p>
|
|
914
942
|
<li class="public ">
|
915
943
|
<span class="summary_signature">
|
916
944
|
|
917
|
-
<a href="#read-instance_method" title="#read (instance method)"
|
945
|
+
<a href="#read-instance_method" title="#read (instance method)">#<strong>read</strong>(file = @file) ⇒ Object </a>
|
918
946
|
|
919
947
|
|
920
948
|
|
@@ -938,7 +966,7 @@ also be used to extract information from files.</p>
|
|
938
966
|
<li class="public ">
|
939
967
|
<span class="summary_signature">
|
940
968
|
|
941
|
-
<a href="#ref-instance_method" title="#ref (instance method)"
|
969
|
+
<a href="#ref-instance_method" title="#ref (instance method)">#<strong>ref</strong>(line = nil) ⇒ Object </a>
|
942
970
|
|
943
971
|
|
944
972
|
|
@@ -962,7 +990,7 @@ also be used to extract information from files.</p>
|
|
962
990
|
<li class="public ">
|
963
991
|
<span class="summary_signature">
|
964
992
|
|
965
|
-
<a href="#search-instance_method" title="#search (instance method)"
|
993
|
+
<a href="#search-instance_method" title="#search (instance method)">#<strong>search</strong>(re_or_str, forward = true) ⇒ Object </a>
|
966
994
|
|
967
995
|
|
968
996
|
|
@@ -986,7 +1014,7 @@ also be used to extract information from files.</p>
|
|
986
1014
|
<li class="public ">
|
987
1015
|
<span class="summary_signature">
|
988
1016
|
|
989
|
-
<a href="#set-instance_method" title="#set (instance method)"
|
1017
|
+
<a href="#set-instance_method" title="#set (instance method)">#<strong>set</strong>(text) ⇒ Object </a>
|
990
1018
|
|
991
1019
|
|
992
1020
|
|
@@ -1010,7 +1038,7 @@ also be used to extract information from files.</p>
|
|
1010
1038
|
<li class="public ">
|
1011
1039
|
<span class="summary_signature">
|
1012
1040
|
|
1013
|
-
<a href="#step-instance_method" title="#step (instance method)"
|
1041
|
+
<a href="#step-instance_method" title="#step (instance method)">#<strong>step</strong>(dir = 1) ⇒ Object </a>
|
1014
1042
|
|
1015
1043
|
|
1016
1044
|
|
@@ -1034,7 +1062,7 @@ also be used to extract information from files.</p>
|
|
1034
1062
|
<li class="public ">
|
1035
1063
|
<span class="summary_signature">
|
1036
1064
|
|
1037
|
-
<a href="#sub-instance_method" title="#sub (instance method)"
|
1065
|
+
<a href="#sub-instance_method" title="#sub (instance method)">#<strong>sub</strong>(from, to) ⇒ Object </a>
|
1038
1066
|
|
1039
1067
|
|
1040
1068
|
|
@@ -1058,7 +1086,7 @@ also be used to extract information from files.</p>
|
|
1058
1086
|
<li class="public ">
|
1059
1087
|
<span class="summary_signature">
|
1060
1088
|
|
1061
|
-
<a href="#unmark-instance_method" title="#unmark (instance method)"
|
1089
|
+
<a href="#unmark-instance_method" title="#unmark (instance method)">#<strong>unmark</strong>(tag = nil) ⇒ Object </a>
|
1062
1090
|
|
1063
1091
|
|
1064
1092
|
|
@@ -1082,7 +1110,7 @@ also be used to extract information from files.</p>
|
|
1082
1110
|
<li class="public ">
|
1083
1111
|
<span class="summary_signature">
|
1084
1112
|
|
1085
|
-
<a href="#update-instance_method" title="#update (instance method)"
|
1113
|
+
<a href="#update-instance_method" title="#update (instance method)">#<strong>update</strong>(&blk) ⇒ Object </a>
|
1086
1114
|
|
1087
1115
|
|
1088
1116
|
|
@@ -1107,7 +1135,7 @@ given block.</p>
|
|
1107
1135
|
<li class="public ">
|
1108
1136
|
<span class="summary_signature">
|
1109
1137
|
|
1110
|
-
<a href="#view-instance_method" title="#view (instance method)"
|
1138
|
+
<a href="#view-instance_method" title="#view (instance method)">#<strong>view</strong>(arg1 = nil, arg2 = nil) ⇒ Object </a>
|
1111
1139
|
|
1112
1140
|
|
1113
1141
|
|
@@ -1131,7 +1159,7 @@ given block.</p>
|
|
1131
1159
|
<li class="public ">
|
1132
1160
|
<span class="summary_signature">
|
1133
1161
|
|
1134
|
-
<a href="#view_ln-instance_method" title="#view_ln (instance method)"
|
1162
|
+
<a href="#view_ln-instance_method" title="#view_ln (instance method)">#<strong>view_ln</strong>(arg1 = nil, arg2 = nil) ⇒ Object </a>
|
1135
1163
|
|
1136
1164
|
|
1137
1165
|
|
@@ -1155,7 +1183,7 @@ given block.</p>
|
|
1155
1183
|
<li class="public ">
|
1156
1184
|
<span class="summary_signature">
|
1157
1185
|
|
1158
|
-
<a href="#write-instance_method" title="#write (instance method)"
|
1186
|
+
<a href="#write-instance_method" title="#write (instance method)">#<strong>write</strong>(file = @file) ⇒ Object </a>
|
1159
1187
|
|
1160
1188
|
|
1161
1189
|
|
@@ -1185,7 +1213,7 @@ given block.</p>
|
|
1185
1213
|
<div class="method_details first">
|
1186
1214
|
<h3 class="signature first" id="initialize-instance_method">
|
1187
1215
|
|
1188
|
-
|
1216
|
+
#<strong>initialize</strong>(file) ⇒ <tt><span class='object_link'><a href="" title="Patman (class)">Patman</a></span></tt>
|
1189
1217
|
|
1190
1218
|
|
1191
1219
|
|
@@ -1208,18 +1236,18 @@ given block.</p>
|
|
1208
1236
|
<pre class="lines">
|
1209
1237
|
|
1210
1238
|
|
1211
|
-
|
1212
|
-
|
1213
|
-
|
1214
|
-
|
1215
|
-
|
1216
|
-
|
1217
|
-
|
1218
|
-
|
1219
|
-
|
1239
|
+
45
|
1240
|
+
46
|
1241
|
+
47
|
1242
|
+
48
|
1243
|
+
49
|
1244
|
+
50
|
1245
|
+
51
|
1246
|
+
52
|
1247
|
+
53</pre>
|
1220
1248
|
</td>
|
1221
1249
|
<td>
|
1222
|
-
<pre class="code"><span class="info file"># File 'lib/patman.rb', line
|
1250
|
+
<pre class="code"><span class="info file"># File 'lib/patman.rb', line 45</span>
|
1223
1251
|
|
1224
1252
|
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span> <span class='id identifier rubyid_file'>file</span> <span class='rparen'>)</span>
|
1225
1253
|
<span class='ivar'>@file</span> <span class='op'>=</span> <span class='id identifier rubyid_file'>file</span>
|
@@ -1245,7 +1273,7 @@ given block.</p>
|
|
1245
1273
|
<div class="method_details first">
|
1246
1274
|
<h3 class="signature first" id="marks-instance_method">
|
1247
1275
|
|
1248
|
-
|
1276
|
+
#<strong>marks</strong> ⇒ <tt>Object</tt>
|
1249
1277
|
|
1250
1278
|
|
1251
1279
|
|
@@ -1291,9 +1319,72 @@ given block.</p>
|
|
1291
1319
|
|
1292
1320
|
|
1293
1321
|
<div class="method_details first">
|
1294
|
-
<h3 class="signature first" id="
|
1322
|
+
<h3 class="signature first" id="edit-class_method">
|
1323
|
+
|
1324
|
+
.<strong>edit</strong>(file, &blk) ⇒ <tt>Object</tt>
|
1325
|
+
|
1326
|
+
|
1327
|
+
|
1328
|
+
|
1329
|
+
|
1330
|
+
</h3><div class="docstring">
|
1331
|
+
<div class="discussion">
|
1332
|
+
|
1333
|
+
<p>Edit file and also create it if it does not exist.</p>
|
1334
|
+
|
1335
|
+
<p>If block is given, a file will be opened and block with Patman commands
|
1336
|
+
will be executed for it. Otherwise a Patman object is returned for further
|
1337
|
+
use.</p>
|
1338
|
+
|
1339
|
+
|
1340
|
+
</div>
|
1341
|
+
</div>
|
1342
|
+
<div class="tags">
|
1343
|
+
|
1344
|
+
|
1345
|
+
</div><table class="source_code">
|
1346
|
+
<tr>
|
1347
|
+
<td>
|
1348
|
+
<pre class="lines">
|
1349
|
+
|
1350
|
+
|
1351
|
+
31
|
1352
|
+
32
|
1353
|
+
33
|
1354
|
+
34
|
1355
|
+
35
|
1356
|
+
36
|
1357
|
+
37
|
1358
|
+
38
|
1359
|
+
39
|
1360
|
+
40
|
1361
|
+
41
|
1362
|
+
42</pre>
|
1363
|
+
</td>
|
1364
|
+
<td>
|
1365
|
+
<pre class="code"><span class="info file"># File 'lib/patman.rb', line 31</span>
|
1366
|
+
|
1367
|
+
<span class='kw'>def</span> <span class='const'><span class='object_link'><a href="" title="Patman (class)">Patman</a></span></span><span class='period'>.</span><span class='id identifier rubyid_edit'>edit</span><span class='lparen'>(</span> <span class='id identifier rubyid_file'>file</span><span class='comma'>,</span> <span class='op'>&</span><span class='id identifier rubyid_blk'>blk</span> <span class='rparen'>)</span>
|
1368
|
+
<span class='id identifier rubyid_p'>p</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="" title="Patman (class)">Patman</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="#initialize-instance_method" title="Patman#initialize (method)">new</a></span></span><span class='lparen'>(</span> <span class='id identifier rubyid_file'>file</span> <span class='rparen'>)</span>
|
1369
|
+
<span class='kw'>if</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_exist?'>exist?</span><span class='lparen'>(</span> <span class='id identifier rubyid_file'>file</span> <span class='rparen'>)</span>
|
1370
|
+
<span class='id identifier rubyid_p'>p</span><span class='period'>.</span><span class='id identifier rubyid_send'>send</span><span class='lparen'>(</span> <span class='symbol'>:read</span><span class='comma'>,</span> <span class='id identifier rubyid_file'>file</span> <span class='rparen'>)</span>
|
1371
|
+
<span class='kw'>end</span>
|
1372
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_block_given?'>block_given?</span>
|
1373
|
+
<span class='id identifier rubyid_p'>p</span><span class='period'>.</span><span class='id identifier rubyid_instance_exec'>instance_exec</span><span class='lparen'>(</span> <span class='op'>&</span><span class='id identifier rubyid_blk'>blk</span> <span class='rparen'>)</span>
|
1374
|
+
<span class='id identifier rubyid_p'>p</span><span class='period'>.</span><span class='id identifier rubyid_send'>send</span><span class='lparen'>(</span> <span class='symbol'>:write</span> <span class='rparen'>)</span>
|
1375
|
+
<span class='kw'>else</span>
|
1376
|
+
<span class='id identifier rubyid_p'>p</span>
|
1377
|
+
<span class='kw'>end</span>
|
1378
|
+
<span class='kw'>end</span></pre>
|
1379
|
+
</td>
|
1380
|
+
</tr>
|
1381
|
+
</table>
|
1382
|
+
</div>
|
1383
|
+
|
1384
|
+
<div class="method_details ">
|
1385
|
+
<h3 class="signature " id="read-class_method">
|
1295
1386
|
|
1296
|
-
|
1387
|
+
.<strong>read</strong>(file) ⇒ <tt>Object</tt>
|
1297
1388
|
|
1298
1389
|
|
1299
1390
|
|
@@ -1325,8 +1416,8 @@ given block.</p>
|
|
1325
1416
|
<td>
|
1326
1417
|
<pre class="code"><span class="info file"># File 'lib/patman.rb', line 19</span>
|
1327
1418
|
|
1328
|
-
<span class='kw'>def</span> <span class='const'>Patman</span><span class='period'>.</span><span class='id identifier rubyid_read'>read</span><span class='lparen'>(</span> <span class='id identifier rubyid_file'>file</span> <span class='rparen'>)</span>
|
1329
|
-
<span class='id identifier rubyid_p'>p</span> <span class='op'>=</span> <span class='const'>Patman</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span> <span class='id identifier rubyid_file'>file</span> <span class='rparen'>)</span>
|
1419
|
+
<span class='kw'>def</span> <span class='const'><span class='object_link'><a href="" title="Patman (class)">Patman</a></span></span><span class='period'>.</span><span class='id identifier rubyid_read'>read</span><span class='lparen'>(</span> <span class='id identifier rubyid_file'>file</span> <span class='rparen'>)</span>
|
1420
|
+
<span class='id identifier rubyid_p'>p</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="" title="Patman (class)">Patman</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="#initialize-instance_method" title="Patman#initialize (method)">new</a></span></span><span class='lparen'>(</span> <span class='id identifier rubyid_file'>file</span> <span class='rparen'>)</span>
|
1330
1421
|
<span class='id identifier rubyid_p'>p</span><span class='period'>.</span><span class='id identifier rubyid_read'>read</span>
|
1331
1422
|
<span class='id identifier rubyid_p'>p</span>
|
1332
1423
|
<span class='kw'>end</span></pre>
|
@@ -1338,7 +1429,7 @@ given block.</p>
|
|
1338
1429
|
<div class="method_details ">
|
1339
1430
|
<h3 class="signature " id="version-class_method">
|
1340
1431
|
|
1341
|
-
|
1432
|
+
.<strong>version</strong> ⇒ <tt>Object</tt>
|
1342
1433
|
|
1343
1434
|
|
1344
1435
|
|
@@ -1357,8 +1448,8 @@ given block.</p>
|
|
1357
1448
|
<td>
|
1358
1449
|
<pre class="code"><span class="info file"># File 'lib/version.rb', line 3</span>
|
1359
1450
|
|
1360
|
-
<span class='kw'>def</span> <span class='const'>Patman</span><span class='period'>.</span><span class='id identifier rubyid_version'>version</span>
|
1361
|
-
<span class='const'>Patman</span><span class='op'>::</span><span class='const'>VERSION</span>
|
1451
|
+
<span class='kw'>def</span> <span class='const'><span class='object_link'><a href="" title="Patman (class)">Patman</a></span></span><span class='period'>.</span><span class='id identifier rubyid_version'>version</span>
|
1452
|
+
<span class='const'><span class='object_link'><a href="" title="Patman (class)">Patman</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="#VERSION-constant" title="Patman::VERSION (constant)">VERSION</a></span></span>
|
1362
1453
|
<span class='kw'>end</span></pre>
|
1363
1454
|
</td>
|
1364
1455
|
</tr>
|
@@ -1374,7 +1465,7 @@ given block.</p>
|
|
1374
1465
|
<div class="method_details first">
|
1375
1466
|
<h3 class="signature first" id="[]-instance_method">
|
1376
1467
|
|
1377
|
-
|
1468
|
+
#<strong>[]</strong>(range) ⇒ <tt>Object</tt>
|
1378
1469
|
|
1379
1470
|
|
1380
1471
|
|
@@ -1397,12 +1488,12 @@ given block.</p>
|
|
1397
1488
|
<pre class="lines">
|
1398
1489
|
|
1399
1490
|
|
1400
|
-
|
1401
|
-
|
1402
|
-
|
1491
|
+
141
|
1492
|
+
142
|
1493
|
+
143</pre>
|
1403
1494
|
</td>
|
1404
1495
|
<td>
|
1405
|
-
<pre class="code"><span class="info file"># File 'lib/patman.rb', line
|
1496
|
+
<pre class="code"><span class="info file"># File 'lib/patman.rb', line 141</span>
|
1406
1497
|
|
1407
1498
|
<span class='kw'>def</span> <span class='op'>[]</span><span class='lparen'>(</span> <span class='id identifier rubyid_range'>range</span> <span class='rparen'>)</span>
|
1408
1499
|
<span class='ivar'>@lines</span><span class='lbracket'>[</span> <span class='id identifier rubyid_range'>range</span> <span class='rbracket'>]</span>
|
@@ -1415,7 +1506,7 @@ given block.</p>
|
|
1415
1506
|
<div class="method_details ">
|
1416
1507
|
<h3 class="signature " id="append-instance_method">
|
1417
1508
|
|
1418
|
-
|
1509
|
+
#<strong>append</strong>(text = nil) ⇒ <tt>Object</tt>
|
1419
1510
|
|
1420
1511
|
|
1421
1512
|
|
@@ -1438,21 +1529,21 @@ given block.</p>
|
|
1438
1529
|
<pre class="lines">
|
1439
1530
|
|
1440
1531
|
|
1441
|
-
|
1442
|
-
|
1443
|
-
|
1444
|
-
|
1445
|
-
|
1446
|
-
|
1447
|
-
|
1448
|
-
|
1449
|
-
|
1450
|
-
|
1451
|
-
|
1452
|
-
|
1532
|
+
210
|
1533
|
+
211
|
1534
|
+
212
|
1535
|
+
213
|
1536
|
+
214
|
1537
|
+
215
|
1538
|
+
216
|
1539
|
+
217
|
1540
|
+
218
|
1541
|
+
219
|
1542
|
+
220
|
1543
|
+
221</pre>
|
1453
1544
|
</td>
|
1454
1545
|
<td>
|
1455
|
-
<pre class="code"><span class="info file"># File 'lib/patman.rb', line
|
1546
|
+
<pre class="code"><span class="info file"># File 'lib/patman.rb', line 210</span>
|
1456
1547
|
|
1457
1548
|
<span class='kw'>def</span> <span class='id identifier rubyid_append'>append</span><span class='lparen'>(</span> <span class='id identifier rubyid_text'>text</span> <span class='op'>=</span> <span class='kw'>nil</span> <span class='rparen'>)</span>
|
1458
1549
|
<span class='ivar'>@edited</span> <span class='op'>=</span> <span class='kw'>true</span>
|
@@ -1474,7 +1565,7 @@ given block.</p>
|
|
1474
1565
|
<div class="method_details ">
|
1475
1566
|
<h3 class="signature " id="blockline-instance_method">
|
1476
1567
|
|
1477
|
-
|
1568
|
+
#<strong>blockline</strong> ⇒ <tt>Object</tt>
|
1478
1569
|
|
1479
1570
|
|
1480
1571
|
|
@@ -1497,15 +1588,15 @@ given block.</p>
|
|
1497
1588
|
<pre class="lines">
|
1498
1589
|
|
1499
1590
|
|
1500
|
-
|
1501
|
-
|
1502
|
-
|
1503
|
-
|
1504
|
-
|
1505
|
-
|
1591
|
+
123
|
1592
|
+
124
|
1593
|
+
125
|
1594
|
+
126
|
1595
|
+
127
|
1596
|
+
128</pre>
|
1506
1597
|
</td>
|
1507
1598
|
<td>
|
1508
|
-
<pre class="code"><span class="info file"># File 'lib/patman.rb', line
|
1599
|
+
<pre class="code"><span class="info file"># File 'lib/patman.rb', line 123</span>
|
1509
1600
|
|
1510
1601
|
<span class='kw'>def</span> <span class='id identifier rubyid_blockline'>blockline</span>
|
1511
1602
|
<span class='kw'>if</span> <span class='ivar'>@blockline</span>
|
@@ -1521,7 +1612,7 @@ given block.</p>
|
|
1521
1612
|
<div class="method_details ">
|
1522
1613
|
<h3 class="signature " id="clear-instance_method">
|
1523
1614
|
|
1524
|
-
|
1615
|
+
#<strong>clear</strong> ⇒ <tt>Object</tt>
|
1525
1616
|
|
1526
1617
|
|
1527
1618
|
|
@@ -1544,15 +1635,15 @@ given block.</p>
|
|
1544
1635
|
<pre class="lines">
|
1545
1636
|
|
1546
1637
|
|
1547
|
-
|
1548
|
-
|
1549
|
-
|
1550
|
-
|
1551
|
-
|
1552
|
-
|
1638
|
+
243
|
1639
|
+
244
|
1640
|
+
245
|
1641
|
+
246
|
1642
|
+
247
|
1643
|
+
248</pre>
|
1553
1644
|
</td>
|
1554
1645
|
<td>
|
1555
|
-
<pre class="code"><span class="info file"># File 'lib/patman.rb', line
|
1646
|
+
<pre class="code"><span class="info file"># File 'lib/patman.rb', line 243</span>
|
1556
1647
|
|
1557
1648
|
<span class='kw'>def</span> <span class='id identifier rubyid_clear'>clear</span>
|
1558
1649
|
<span class='ivar'>@edited</span> <span class='op'>=</span> <span class='kw'>true</span>
|
@@ -1568,7 +1659,7 @@ given block.</p>
|
|
1568
1659
|
<div class="method_details ">
|
1569
1660
|
<h3 class="signature " id="copy-instance_method">
|
1570
1661
|
|
1571
|
-
|
1662
|
+
#<strong>copy</strong>(file) ⇒ <tt>Object</tt>
|
1572
1663
|
|
1573
1664
|
|
1574
1665
|
|
@@ -1591,13 +1682,13 @@ given block.</p>
|
|
1591
1682
|
<pre class="lines">
|
1592
1683
|
|
1593
1684
|
|
1594
|
-
|
1595
|
-
|
1596
|
-
|
1597
|
-
|
1685
|
+
89
|
1686
|
+
90
|
1687
|
+
91
|
1688
|
+
92</pre>
|
1598
1689
|
</td>
|
1599
1690
|
<td>
|
1600
|
-
<pre class="code"><span class="info file"># File 'lib/patman.rb', line
|
1691
|
+
<pre class="code"><span class="info file"># File 'lib/patman.rb', line 89</span>
|
1601
1692
|
|
1602
1693
|
<span class='kw'>def</span> <span class='id identifier rubyid_copy'>copy</span><span class='lparen'>(</span> <span class='id identifier rubyid_file'>file</span> <span class='rparen'>)</span>
|
1603
1694
|
<span class='id identifier rubyid_write'>write</span><span class='lparen'>(</span> <span class='id identifier rubyid_file'>file</span> <span class='rparen'>)</span>
|
@@ -1611,7 +1702,7 @@ given block.</p>
|
|
1611
1702
|
<div class="method_details ">
|
1612
1703
|
<h3 class="signature " id="delete-instance_method">
|
1613
1704
|
|
1614
|
-
|
1705
|
+
#<strong>delete</strong>(count = 1) ⇒ <tt>Object</tt>
|
1615
1706
|
|
1616
1707
|
|
1617
1708
|
|
@@ -1634,16 +1725,16 @@ given block.</p>
|
|
1634
1725
|
<pre class="lines">
|
1635
1726
|
|
1636
1727
|
|
1637
|
-
|
1638
|
-
|
1639
|
-
|
1640
|
-
|
1641
|
-
|
1642
|
-
|
1643
|
-
|
1728
|
+
224
|
1729
|
+
225
|
1730
|
+
226
|
1731
|
+
227
|
1732
|
+
228
|
1733
|
+
229
|
1734
|
+
230</pre>
|
1644
1735
|
</td>
|
1645
1736
|
<td>
|
1646
|
-
<pre class="code"><span class="info file"># File 'lib/patman.rb', line
|
1737
|
+
<pre class="code"><span class="info file"># File 'lib/patman.rb', line 224</span>
|
1647
1738
|
|
1648
1739
|
<span class='kw'>def</span> <span class='id identifier rubyid_delete'>delete</span><span class='lparen'>(</span> <span class='id identifier rubyid_count'>count</span> <span class='op'>=</span> <span class='int'>1</span> <span class='rparen'>)</span>
|
1649
1740
|
<span class='ivar'>@edited</span> <span class='op'>=</span> <span class='kw'>true</span>
|
@@ -1660,7 +1751,7 @@ given block.</p>
|
|
1660
1751
|
<div class="method_details ">
|
1661
1752
|
<h3 class="signature " id="do_all-instance_method">
|
1662
1753
|
|
1663
|
-
|
1754
|
+
#<strong>do_all</strong>(&blk) ⇒ <tt>Object</tt>
|
1664
1755
|
|
1665
1756
|
|
1666
1757
|
|
@@ -1684,12 +1775,12 @@ given block.</p>
|
|
1684
1775
|
<pre class="lines">
|
1685
1776
|
|
1686
1777
|
|
1687
|
-
|
1688
|
-
|
1689
|
-
|
1778
|
+
324
|
1779
|
+
325
|
1780
|
+
326</pre>
|
1690
1781
|
</td>
|
1691
1782
|
<td>
|
1692
|
-
<pre class="code"><span class="info file"># File 'lib/patman.rb', line
|
1783
|
+
<pre class="code"><span class="info file"># File 'lib/patman.rb', line 324</span>
|
1693
1784
|
|
1694
1785
|
<span class='kw'>def</span> <span class='id identifier rubyid_do_all'>do_all</span><span class='lparen'>(</span> <span class='op'>&</span><span class='id identifier rubyid_blk'>blk</span> <span class='rparen'>)</span>
|
1695
1786
|
<span class='id identifier rubyid_do_for'>do_for</span><span class='lparen'>(</span> <span class='int'>1</span><span class='comma'>,</span> <span class='id identifier rubyid_length'>length</span><span class='op'>-</span><span class='int'>1</span><span class='comma'>,</span> <span class='op'>&</span><span class='id identifier rubyid_blk'>blk</span> <span class='rparen'>)</span>
|
@@ -1702,7 +1793,7 @@ given block.</p>
|
|
1702
1793
|
<div class="method_details ">
|
1703
1794
|
<h3 class="signature " id="do_for-instance_method">
|
1704
1795
|
|
1705
|
-
|
1796
|
+
#<strong>do_for</strong>(start, count, &blk) ⇒ <tt>Object</tt>
|
1706
1797
|
|
1707
1798
|
|
1708
1799
|
|
@@ -1725,20 +1816,20 @@ given block.</p>
|
|
1725
1816
|
<pre class="lines">
|
1726
1817
|
|
1727
1818
|
|
1728
|
-
|
1729
|
-
|
1730
|
-
|
1731
|
-
|
1732
|
-
|
1733
|
-
|
1734
|
-
|
1735
|
-
|
1736
|
-
|
1737
|
-
|
1738
|
-
|
1819
|
+
336
|
1820
|
+
337
|
1821
|
+
338
|
1822
|
+
339
|
1823
|
+
340
|
1824
|
+
341
|
1825
|
+
342
|
1826
|
+
343
|
1827
|
+
344
|
1828
|
+
345
|
1829
|
+
346</pre>
|
1739
1830
|
</td>
|
1740
1831
|
<td>
|
1741
|
-
<pre class="code"><span class="info file"># File 'lib/patman.rb', line
|
1832
|
+
<pre class="code"><span class="info file"># File 'lib/patman.rb', line 336</span>
|
1742
1833
|
|
1743
1834
|
<span class='kw'>def</span> <span class='id identifier rubyid_do_for'>do_for</span><span class='lparen'>(</span> <span class='id identifier rubyid_start'>start</span><span class='comma'>,</span> <span class='id identifier rubyid_count'>count</span><span class='comma'>,</span> <span class='op'>&</span><span class='id identifier rubyid_blk'>blk</span> <span class='rparen'>)</span>
|
1744
1835
|
<span class='id identifier rubyid_line'>line</span> <span class='op'>=</span> <span class='ivar'>@line</span>
|
@@ -1759,7 +1850,7 @@ given block.</p>
|
|
1759
1850
|
<div class="method_details ">
|
1760
1851
|
<h3 class="signature " id="do_range-instance_method">
|
1761
1852
|
|
1762
|
-
|
1853
|
+
#<strong>do_range</strong>(start, stop, &blk) ⇒ <tt>Object</tt>
|
1763
1854
|
|
1764
1855
|
|
1765
1856
|
|
@@ -1782,12 +1873,12 @@ given block.</p>
|
|
1782
1873
|
<pre class="lines">
|
1783
1874
|
|
1784
1875
|
|
1785
|
-
|
1786
|
-
|
1787
|
-
|
1876
|
+
330
|
1877
|
+
331
|
1878
|
+
332</pre>
|
1788
1879
|
</td>
|
1789
1880
|
<td>
|
1790
|
-
<pre class="code"><span class="info file"># File 'lib/patman.rb', line
|
1881
|
+
<pre class="code"><span class="info file"># File 'lib/patman.rb', line 330</span>
|
1791
1882
|
|
1792
1883
|
<span class='kw'>def</span> <span class='id identifier rubyid_do_range'>do_range</span><span class='lparen'>(</span> <span class='id identifier rubyid_start'>start</span><span class='comma'>,</span> <span class='id identifier rubyid_stop'>stop</span><span class='comma'>,</span> <span class='op'>&</span><span class='id identifier rubyid_blk'>blk</span> <span class='rparen'>)</span>
|
1793
1884
|
<span class='id identifier rubyid_do_for'>do_for</span><span class='lparen'>(</span> <span class='id identifier rubyid_start'>start</span><span class='comma'>,</span> <span class='lparen'>(</span><span class='id identifier rubyid_stop'>stop</span><span class='op'>-</span><span class='id identifier rubyid_start'>start</span><span class='op'>+</span><span class='int'>1</span><span class='rparen'>)</span><span class='comma'>,</span> <span class='op'>&</span><span class='id identifier rubyid_blk'>blk</span> <span class='rparen'>)</span>
|
@@ -1800,7 +1891,7 @@ given block.</p>
|
|
1800
1891
|
<div class="method_details ">
|
1801
1892
|
<h3 class="signature " id="edit-instance_method">
|
1802
1893
|
|
1803
|
-
|
1894
|
+
#<strong>edit</strong> ⇒ <tt>Object</tt>
|
1804
1895
|
|
1805
1896
|
|
1806
1897
|
|
@@ -1823,12 +1914,12 @@ given block.</p>
|
|
1823
1914
|
<pre class="lines">
|
1824
1915
|
|
1825
1916
|
|
1826
|
-
|
1827
|
-
|
1828
|
-
|
1917
|
+
279
|
1918
|
+
280
|
1919
|
+
281</pre>
|
1829
1920
|
</td>
|
1830
1921
|
<td>
|
1831
|
-
<pre class="code"><span class="info file"># File 'lib/patman.rb', line
|
1922
|
+
<pre class="code"><span class="info file"># File 'lib/patman.rb', line 279</span>
|
1832
1923
|
|
1833
1924
|
<span class='kw'>def</span> <span class='id identifier rubyid_edit'>edit</span>
|
1834
1925
|
<span class='ivar'>@edited</span> <span class='op'>=</span> <span class='kw'>true</span>
|
@@ -1841,7 +1932,7 @@ given block.</p>
|
|
1841
1932
|
<div class="method_details ">
|
1842
1933
|
<h3 class="signature " id="edited?-instance_method">
|
1843
1934
|
|
1844
|
-
|
1935
|
+
#<strong>edited?</strong> ⇒ <tt>Boolean</tt>
|
1845
1936
|
|
1846
1937
|
|
1847
1938
|
|
@@ -1877,12 +1968,12 @@ given block.</p>
|
|
1877
1968
|
<pre class="lines">
|
1878
1969
|
|
1879
1970
|
|
1880
|
-
|
1881
|
-
|
1882
|
-
|
1971
|
+
284
|
1972
|
+
285
|
1973
|
+
286</pre>
|
1883
1974
|
</td>
|
1884
1975
|
<td>
|
1885
|
-
<pre class="code"><span class="info file"># File 'lib/patman.rb', line
|
1976
|
+
<pre class="code"><span class="info file"># File 'lib/patman.rb', line 284</span>
|
1886
1977
|
|
1887
1978
|
<span class='kw'>def</span> <span class='id identifier rubyid_edited?'>edited?</span>
|
1888
1979
|
<span class='ivar'>@edited</span>
|
@@ -1895,7 +1986,7 @@ given block.</p>
|
|
1895
1986
|
<div class="method_details ">
|
1896
1987
|
<h3 class="signature " id="excursion-instance_method">
|
1897
1988
|
|
1898
|
-
|
1989
|
+
#<strong>excursion</strong>(&blk) ⇒ <tt>Object</tt>
|
1899
1990
|
|
1900
1991
|
|
1901
1992
|
|
@@ -1918,15 +2009,15 @@ given block.</p>
|
|
1918
2009
|
<pre class="lines">
|
1919
2010
|
|
1920
2011
|
|
1921
|
-
|
1922
|
-
|
1923
|
-
|
1924
|
-
|
1925
|
-
|
1926
|
-
|
2012
|
+
289
|
2013
|
+
290
|
2014
|
+
291
|
2015
|
+
292
|
2016
|
+
293
|
2017
|
+
294</pre>
|
1927
2018
|
</td>
|
1928
2019
|
<td>
|
1929
|
-
<pre class="code"><span class="info file"># File 'lib/patman.rb', line
|
2020
|
+
<pre class="code"><span class="info file"># File 'lib/patman.rb', line 289</span>
|
1930
2021
|
|
1931
2022
|
<span class='kw'>def</span> <span class='id identifier rubyid_excursion'>excursion</span><span class='lparen'>(</span> <span class='op'>&</span><span class='id identifier rubyid_blk'>blk</span> <span class='rparen'>)</span>
|
1932
2023
|
<span class='id identifier rubyid_line'>line</span> <span class='op'>=</span> <span class='ivar'>@line</span>
|
@@ -1942,7 +2033,7 @@ given block.</p>
|
|
1942
2033
|
<div class="method_details ">
|
1943
2034
|
<h3 class="signature " id="filename-instance_method">
|
1944
2035
|
|
1945
|
-
|
2036
|
+
#<strong>filename</strong> ⇒ <tt>Object</tt>
|
1946
2037
|
|
1947
2038
|
|
1948
2039
|
|
@@ -1965,12 +2056,12 @@ given block.</p>
|
|
1965
2056
|
<pre class="lines">
|
1966
2057
|
|
1967
2058
|
|
1968
|
-
|
1969
|
-
|
1970
|
-
|
2059
|
+
274
|
2060
|
+
275
|
2061
|
+
276</pre>
|
1971
2062
|
</td>
|
1972
2063
|
<td>
|
1973
|
-
<pre class="code"><span class="info file"># File 'lib/patman.rb', line
|
2064
|
+
<pre class="code"><span class="info file"># File 'lib/patman.rb', line 274</span>
|
1974
2065
|
|
1975
2066
|
<span class='kw'>def</span> <span class='id identifier rubyid_filename'>filename</span>
|
1976
2067
|
<span class='ivar'>@file</span>
|
@@ -1983,7 +2074,7 @@ given block.</p>
|
|
1983
2074
|
<div class="method_details ">
|
1984
2075
|
<h3 class="signature " id="find-instance_method">
|
1985
2076
|
|
1986
|
-
|
2077
|
+
#<strong>find</strong>(re_or_str, forward = true) ⇒ <tt>Object</tt>
|
1987
2078
|
|
1988
2079
|
|
1989
2080
|
|
@@ -2007,17 +2098,17 @@ success.</p>
|
|
2007
2098
|
<pre class="lines">
|
2008
2099
|
|
2009
2100
|
|
2010
|
-
|
2011
|
-
|
2012
|
-
|
2013
|
-
|
2014
|
-
|
2015
|
-
|
2016
|
-
|
2017
|
-
|
2101
|
+
252
|
2102
|
+
253
|
2103
|
+
254
|
2104
|
+
255
|
2105
|
+
256
|
2106
|
+
257
|
2107
|
+
258
|
2108
|
+
259</pre>
|
2018
2109
|
</td>
|
2019
2110
|
<td>
|
2020
|
-
<pre class="code"><span class="info file"># File 'lib/patman.rb', line
|
2111
|
+
<pre class="code"><span class="info file"># File 'lib/patman.rb', line 252</span>
|
2021
2112
|
|
2022
2113
|
<span class='kw'>def</span> <span class='id identifier rubyid_find'>find</span><span class='lparen'>(</span> <span class='id identifier rubyid_re_or_str'>re_or_str</span><span class='comma'>,</span> <span class='id identifier rubyid_forward'>forward</span> <span class='op'>=</span> <span class='kw'>true</span> <span class='rparen'>)</span>
|
2023
2114
|
<span class='kw'>begin</span>
|
@@ -2035,7 +2126,7 @@ success.</p>
|
|
2035
2126
|
<div class="method_details ">
|
2036
2127
|
<h3 class="signature " id="firstline-instance_method">
|
2037
2128
|
|
2038
|
-
|
2129
|
+
#<strong>firstline</strong> ⇒ <tt>Object</tt>
|
2039
2130
|
|
2040
2131
|
|
2041
2132
|
|
@@ -2058,13 +2149,13 @@ success.</p>
|
|
2058
2149
|
<pre class="lines">
|
2059
2150
|
|
2060
2151
|
|
2061
|
-
|
2062
|
-
|
2063
|
-
|
2064
|
-
|
2152
|
+
111
|
2153
|
+
112
|
2154
|
+
113
|
2155
|
+
114</pre>
|
2065
2156
|
</td>
|
2066
2157
|
<td>
|
2067
|
-
<pre class="code"><span class="info file"># File 'lib/patman.rb', line
|
2158
|
+
<pre class="code"><span class="info file"># File 'lib/patman.rb', line 111</span>
|
2068
2159
|
|
2069
2160
|
<span class='kw'>def</span> <span class='id identifier rubyid_firstline'>firstline</span>
|
2070
2161
|
<span class='ivar'>@line</span> <span class='op'>=</span> <span class='int'>0</span>
|
@@ -2078,7 +2169,7 @@ success.</p>
|
|
2078
2169
|
<div class="method_details ">
|
2079
2170
|
<h3 class="signature " id="get-instance_method">
|
2080
2171
|
|
2081
|
-
|
2172
|
+
#<strong>get</strong>(count = 1) ⇒ <tt>Object</tt>
|
2082
2173
|
|
2083
2174
|
|
2084
2175
|
|
@@ -2101,16 +2192,16 @@ success.</p>
|
|
2101
2192
|
<pre class="lines">
|
2102
2193
|
|
2103
2194
|
|
2104
|
-
|
2105
|
-
|
2106
|
-
|
2107
|
-
|
2108
|
-
|
2109
|
-
|
2110
|
-
|
2195
|
+
146
|
2196
|
+
147
|
2197
|
+
148
|
2198
|
+
149
|
2199
|
+
150
|
2200
|
+
151
|
2201
|
+
152</pre>
|
2111
2202
|
</td>
|
2112
2203
|
<td>
|
2113
|
-
<pre class="code"><span class="info file"># File 'lib/patman.rb', line
|
2204
|
+
<pre class="code"><span class="info file"># File 'lib/patman.rb', line 146</span>
|
2114
2205
|
|
2115
2206
|
<span class='kw'>def</span> <span class='id identifier rubyid_get'>get</span><span class='lparen'>(</span> <span class='id identifier rubyid_count'>count</span> <span class='op'>=</span> <span class='int'>1</span> <span class='rparen'>)</span>
|
2116
2207
|
<span class='kw'>if</span> <span class='id identifier rubyid_count'>count</span> <span class='op'>==</span> <span class='int'>1</span>
|
@@ -2127,7 +2218,7 @@ success.</p>
|
|
2127
2218
|
<div class="method_details ">
|
2128
2219
|
<h3 class="signature " id="get_for-instance_method">
|
2129
2220
|
|
2130
|
-
|
2221
|
+
#<strong>get_for</strong>(start, count) ⇒ <tt>Object</tt>
|
2131
2222
|
|
2132
2223
|
|
2133
2224
|
|
@@ -2150,12 +2241,12 @@ success.</p>
|
|
2150
2241
|
<pre class="lines">
|
2151
2242
|
|
2152
2243
|
|
2153
|
-
|
2154
|
-
|
2155
|
-
|
2244
|
+
354
|
2245
|
+
355
|
2246
|
+
356</pre>
|
2156
2247
|
</td>
|
2157
2248
|
<td>
|
2158
|
-
<pre class="code"><span class="info file"># File 'lib/patman.rb', line
|
2249
|
+
<pre class="code"><span class="info file"># File 'lib/patman.rb', line 354</span>
|
2159
2250
|
|
2160
2251
|
<span class='kw'>def</span> <span class='id identifier rubyid_get_for'>get_for</span><span class='lparen'>(</span> <span class='id identifier rubyid_start'>start</span><span class='comma'>,</span> <span class='id identifier rubyid_count'>count</span> <span class='rparen'>)</span>
|
2161
2252
|
<span class='ivar'>@lines</span><span class='lbracket'>[</span> <span class='lparen'>(</span><span class='id identifier rubyid_start'>start</span><span class='op'>-</span><span class='int'>1</span><span class='rparen'>)</span> <span class='op'>...</span> <span class='lparen'>(</span><span class='id identifier rubyid_start'>start</span><span class='op'>-</span><span class='int'>1</span><span class='op'>+</span><span class='id identifier rubyid_count'>count</span><span class='rparen'>)</span> <span class='rbracket'>]</span>
|
@@ -2168,7 +2259,7 @@ success.</p>
|
|
2168
2259
|
<div class="method_details ">
|
2169
2260
|
<h3 class="signature " id="get_range-instance_method">
|
2170
2261
|
|
2171
|
-
|
2262
|
+
#<strong>get_range</strong>(start, stop) ⇒ <tt>Object</tt>
|
2172
2263
|
|
2173
2264
|
|
2174
2265
|
|
@@ -2191,12 +2282,12 @@ success.</p>
|
|
2191
2282
|
<pre class="lines">
|
2192
2283
|
|
2193
2284
|
|
2194
|
-
|
2195
|
-
|
2196
|
-
|
2285
|
+
349
|
2286
|
+
350
|
2287
|
+
351</pre>
|
2197
2288
|
</td>
|
2198
2289
|
<td>
|
2199
|
-
<pre class="code"><span class="info file"># File 'lib/patman.rb', line
|
2290
|
+
<pre class="code"><span class="info file"># File 'lib/patman.rb', line 349</span>
|
2200
2291
|
|
2201
2292
|
<span class='kw'>def</span> <span class='id identifier rubyid_get_range'>get_range</span><span class='lparen'>(</span> <span class='id identifier rubyid_start'>start</span><span class='comma'>,</span> <span class='id identifier rubyid_stop'>stop</span> <span class='rparen'>)</span>
|
2202
2293
|
<span class='ivar'>@lines</span><span class='lbracket'>[</span> <span class='lparen'>(</span><span class='id identifier rubyid_start'>start</span><span class='op'>-</span><span class='int'>1</span><span class='rparen'>)</span> <span class='op'>..</span> <span class='lparen'>(</span><span class='id identifier rubyid_stop'>stop</span><span class='op'>-</span><span class='int'>1</span><span class='rparen'>)</span> <span class='rbracket'>]</span>
|
@@ -2209,7 +2300,7 @@ success.</p>
|
|
2209
2300
|
<div class="method_details ">
|
2210
2301
|
<h3 class="signature " id="insert-instance_method">
|
2211
2302
|
|
2212
|
-
|
2303
|
+
#<strong>insert</strong>(text = nil) ⇒ <tt>Object</tt>
|
2213
2304
|
|
2214
2305
|
|
2215
2306
|
|
@@ -2232,29 +2323,29 @@ success.</p>
|
|
2232
2323
|
<pre class="lines">
|
2233
2324
|
|
2234
2325
|
|
2235
|
-
|
2236
|
-
|
2237
|
-
|
2238
|
-
|
2239
|
-
|
2240
|
-
|
2241
|
-
|
2242
|
-
|
2243
|
-
|
2244
|
-
|
2245
|
-
|
2246
|
-
|
2247
|
-
|
2248
|
-
|
2326
|
+
194
|
2327
|
+
195
|
2328
|
+
196
|
2329
|
+
197
|
2330
|
+
198
|
2331
|
+
199
|
2332
|
+
200
|
2333
|
+
201
|
2334
|
+
202
|
2335
|
+
203
|
2336
|
+
204
|
2337
|
+
205
|
2338
|
+
206
|
2339
|
+
207</pre>
|
2249
2340
|
</td>
|
2250
2341
|
<td>
|
2251
|
-
<pre class="code"><span class="info file"># File 'lib/patman.rb', line
|
2342
|
+
<pre class="code"><span class="info file"># File 'lib/patman.rb', line 194</span>
|
2252
2343
|
|
2253
2344
|
<span class='kw'>def</span> <span class='id identifier rubyid_insert'>insert</span><span class='lparen'>(</span> <span class='id identifier rubyid_text'>text</span> <span class='op'>=</span> <span class='kw'>nil</span> <span class='rparen'>)</span>
|
2254
2345
|
<span class='ivar'>@edited</span> <span class='op'>=</span> <span class='kw'>true</span>
|
2255
2346
|
<span class='kw'>if</span> <span class='id identifier rubyid_text'>text</span><span class='period'>.</span><span class='id identifier rubyid_kind_of?'>kind_of?</span> <span class='const'>Array</span>
|
2256
2347
|
<span class='id identifier rubyid_line'>line</span> <span class='op'>=</span> <span class='ivar'>@line</span>
|
2257
|
-
<span class='id identifier rubyid_step'>step</span> <span class='op'>-</span><span class='int'>1</span>
|
2348
|
+
<span class='id identifier rubyid_step'>step</span><span class='lparen'>(</span> <span class='op'>-</span><span class='int'>1</span> <span class='rparen'>)</span>
|
2258
2349
|
<span class='id identifier rubyid_text'>text</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_txt'>txt</span><span class='op'>|</span>
|
2259
2350
|
<span class='id identifier rubyid_append'>append</span><span class='lparen'>(</span> <span class='id identifier rubyid_txt'>txt</span> <span class='rparen'>)</span>
|
2260
2351
|
<span class='kw'>end</span>
|
@@ -2272,7 +2363,7 @@ success.</p>
|
|
2272
2363
|
<div class="method_details ">
|
2273
2364
|
<h3 class="signature " id="insertfile-instance_method">
|
2274
2365
|
|
2275
|
-
|
2366
|
+
#<strong>insertfile</strong>(file) ⇒ <tt>Object</tt>
|
2276
2367
|
|
2277
2368
|
|
2278
2369
|
|
@@ -2295,21 +2386,21 @@ success.</p>
|
|
2295
2386
|
<pre class="lines">
|
2296
2387
|
|
2297
2388
|
|
2298
|
-
|
2299
|
-
|
2300
|
-
|
2301
|
-
|
2302
|
-
|
2303
|
-
|
2304
|
-
|
2305
|
-
|
2389
|
+
233
|
2390
|
+
234
|
2391
|
+
235
|
2392
|
+
236
|
2393
|
+
237
|
2394
|
+
238
|
2395
|
+
239
|
2396
|
+
240</pre>
|
2306
2397
|
</td>
|
2307
2398
|
<td>
|
2308
|
-
<pre class="code"><span class="info file"># File 'lib/patman.rb', line
|
2399
|
+
<pre class="code"><span class="info file"># File 'lib/patman.rb', line 233</span>
|
2309
2400
|
|
2310
2401
|
<span class='kw'>def</span> <span class='id identifier rubyid_insertfile'>insertfile</span><span class='lparen'>(</span> <span class='id identifier rubyid_file'>file</span> <span class='rparen'>)</span>
|
2311
2402
|
<span class='ivar'>@edited</span> <span class='op'>=</span> <span class='kw'>true</span>
|
2312
|
-
<span class='id identifier rubyid_step'>step</span> <span class='op'>-</span><span class='int'>1</span>
|
2403
|
+
<span class='id identifier rubyid_step'>step</span><span class='lparen'>(</span> <span class='op'>-</span><span class='int'>1</span> <span class='rparen'>)</span>
|
2313
2404
|
<span class='id identifier rubyid_read_clean'>read_clean</span><span class='lparen'>(</span> <span class='id identifier rubyid_file'>file</span> <span class='rparen'>)</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_line'>line</span><span class='op'>|</span>
|
2314
2405
|
<span class='id identifier rubyid_append'>append</span> <span class='id identifier rubyid_line'>line</span>
|
2315
2406
|
<span class='kw'>end</span>
|
@@ -2323,7 +2414,7 @@ success.</p>
|
|
2323
2414
|
<div class="method_details ">
|
2324
2415
|
<h3 class="signature " id="lastline-instance_method">
|
2325
2416
|
|
2326
|
-
|
2417
|
+
#<strong>lastline</strong> ⇒ <tt>Object</tt>
|
2327
2418
|
|
2328
2419
|
|
2329
2420
|
|
@@ -2346,13 +2437,13 @@ success.</p>
|
|
2346
2437
|
<pre class="lines">
|
2347
2438
|
|
2348
2439
|
|
2349
|
-
|
2350
|
-
|
2351
|
-
|
2352
|
-
|
2440
|
+
117
|
2441
|
+
118
|
2442
|
+
119
|
2443
|
+
120</pre>
|
2353
2444
|
</td>
|
2354
2445
|
<td>
|
2355
|
-
<pre class="code"><span class="info file"># File 'lib/patman.rb', line
|
2446
|
+
<pre class="code"><span class="info file"># File 'lib/patman.rb', line 117</span>
|
2356
2447
|
|
2357
2448
|
<span class='kw'>def</span> <span class='id identifier rubyid_lastline'>lastline</span>
|
2358
2449
|
<span class='ivar'>@line</span> <span class='op'>=</span> <span class='ivar'>@lines</span><span class='period'>.</span><span class='id identifier rubyid_length'>length</span><span class='op'>-</span><span class='int'>1</span>
|
@@ -2366,7 +2457,7 @@ success.</p>
|
|
2366
2457
|
<div class="method_details ">
|
2367
2458
|
<h3 class="signature " id="length-instance_method">
|
2368
2459
|
|
2369
|
-
|
2460
|
+
#<strong>length</strong> ⇒ <tt>Object</tt>
|
2370
2461
|
|
2371
2462
|
|
2372
2463
|
|
@@ -2389,12 +2480,12 @@ success.</p>
|
|
2389
2480
|
<pre class="lines">
|
2390
2481
|
|
2391
2482
|
|
2392
|
-
|
2393
|
-
|
2394
|
-
|
2483
|
+
269
|
2484
|
+
270
|
2485
|
+
271</pre>
|
2395
2486
|
</td>
|
2396
2487
|
<td>
|
2397
|
-
<pre class="code"><span class="info file"># File 'lib/patman.rb', line
|
2488
|
+
<pre class="code"><span class="info file"># File 'lib/patman.rb', line 269</span>
|
2398
2489
|
|
2399
2490
|
<span class='kw'>def</span> <span class='id identifier rubyid_length'>length</span>
|
2400
2491
|
<span class='ivar'>@lines</span><span class='period'>.</span><span class='id identifier rubyid_length'>length</span>
|
@@ -2407,7 +2498,7 @@ success.</p>
|
|
2407
2498
|
<div class="method_details ">
|
2408
2499
|
<h3 class="signature " id="line-instance_method">
|
2409
2500
|
|
2410
|
-
|
2501
|
+
#<strong>line</strong>(arg = nil) ⇒ <tt>Object</tt>
|
2411
2502
|
|
2412
2503
|
|
2413
2504
|
|
@@ -2430,17 +2521,17 @@ success.</p>
|
|
2430
2521
|
<pre class="lines">
|
2431
2522
|
|
2432
2523
|
|
2433
|
-
|
2434
|
-
|
2435
|
-
|
2436
|
-
|
2437
|
-
|
2438
|
-
|
2439
|
-
|
2440
|
-
|
2524
|
+
95
|
2525
|
+
96
|
2526
|
+
97
|
2527
|
+
98
|
2528
|
+
99
|
2529
|
+
100
|
2530
|
+
101
|
2531
|
+
102</pre>
|
2441
2532
|
</td>
|
2442
2533
|
<td>
|
2443
|
-
<pre class="code"><span class="info file"># File 'lib/patman.rb', line
|
2534
|
+
<pre class="code"><span class="info file"># File 'lib/patman.rb', line 95</span>
|
2444
2535
|
|
2445
2536
|
<span class='kw'>def</span> <span class='id identifier rubyid_line'>line</span><span class='lparen'>(</span> <span class='id identifier rubyid_arg'>arg</span> <span class='op'>=</span> <span class='kw'>nil</span> <span class='rparen'>)</span>
|
2446
2537
|
<span class='kw'>if</span> <span class='id identifier rubyid_arg'>arg</span>
|
@@ -2458,7 +2549,7 @@ success.</p>
|
|
2458
2549
|
<div class="method_details ">
|
2459
2550
|
<h3 class="signature " id="lines-instance_method">
|
2460
2551
|
|
2461
|
-
|
2552
|
+
#<strong>lines</strong>(arg = nil) ⇒ <tt>Object</tt>
|
2462
2553
|
|
2463
2554
|
|
2464
2555
|
|
@@ -2481,17 +2572,17 @@ success.</p>
|
|
2481
2572
|
<pre class="lines">
|
2482
2573
|
|
2483
2574
|
|
2484
|
-
|
2485
|
-
|
2486
|
-
|
2487
|
-
|
2488
|
-
|
2489
|
-
|
2490
|
-
|
2491
|
-
|
2575
|
+
131
|
2576
|
+
132
|
2577
|
+
133
|
2578
|
+
134
|
2579
|
+
135
|
2580
|
+
136
|
2581
|
+
137
|
2582
|
+
138</pre>
|
2492
2583
|
</td>
|
2493
2584
|
<td>
|
2494
|
-
<pre class="code"><span class="info file"># File 'lib/patman.rb', line
|
2585
|
+
<pre class="code"><span class="info file"># File 'lib/patman.rb', line 131</span>
|
2495
2586
|
|
2496
2587
|
<span class='kw'>def</span> <span class='id identifier rubyid_lines'>lines</span><span class='lparen'>(</span> <span class='id identifier rubyid_arg'>arg</span> <span class='op'>=</span> <span class='kw'>nil</span> <span class='rparen'>)</span>
|
2497
2588
|
<span class='kw'>if</span> <span class='id identifier rubyid_arg'>arg</span>
|
@@ -2509,7 +2600,7 @@ success.</p>
|
|
2509
2600
|
<div class="method_details ">
|
2510
2601
|
<h3 class="signature " id="mark-instance_method">
|
2511
2602
|
|
2512
|
-
|
2603
|
+
#<strong>mark</strong>(tag = nil) ⇒ <tt>Object</tt>
|
2513
2604
|
|
2514
2605
|
|
2515
2606
|
|
@@ -2532,18 +2623,18 @@ success.</p>
|
|
2532
2623
|
<pre class="lines">
|
2533
2624
|
|
2534
2625
|
|
2535
|
-
|
2536
|
-
|
2537
|
-
|
2538
|
-
|
2539
|
-
|
2540
|
-
|
2541
|
-
|
2542
|
-
|
2543
|
-
|
2626
|
+
297
|
2627
|
+
298
|
2628
|
+
299
|
2629
|
+
300
|
2630
|
+
301
|
2631
|
+
302
|
2632
|
+
303
|
2633
|
+
304
|
2634
|
+
305</pre>
|
2544
2635
|
</td>
|
2545
2636
|
<td>
|
2546
|
-
<pre class="code"><span class="info file"># File 'lib/patman.rb', line
|
2637
|
+
<pre class="code"><span class="info file"># File 'lib/patman.rb', line 297</span>
|
2547
2638
|
|
2548
2639
|
<span class='kw'>def</span> <span class='id identifier rubyid_mark'>mark</span><span class='lparen'>(</span> <span class='id identifier rubyid_tag'>tag</span> <span class='op'>=</span> <span class='kw'>nil</span> <span class='rparen'>)</span>
|
2549
2640
|
<span class='kw'>if</span> <span class='id identifier rubyid_tag'>tag</span>
|
@@ -2562,7 +2653,7 @@ success.</p>
|
|
2562
2653
|
<div class="method_details ">
|
2563
2654
|
<h3 class="signature " id="peek-instance_method">
|
2564
2655
|
|
2565
|
-
|
2656
|
+
#<strong>peek</strong>(count = 0) ⇒ <tt>Object</tt>
|
2566
2657
|
|
2567
2658
|
|
2568
2659
|
|
@@ -2585,13 +2676,13 @@ success.</p>
|
|
2585
2676
|
<pre class="lines">
|
2586
2677
|
|
2587
2678
|
|
2588
|
-
|
2589
|
-
|
2590
|
-
|
2591
|
-
|
2679
|
+
359
|
2680
|
+
360
|
2681
|
+
361
|
2682
|
+
362</pre>
|
2592
2683
|
</td>
|
2593
2684
|
<td>
|
2594
|
-
<pre class="code"><span class="info file"># File 'lib/patman.rb', line
|
2685
|
+
<pre class="code"><span class="info file"># File 'lib/patman.rb', line 359</span>
|
2595
2686
|
|
2596
2687
|
<span class='kw'>def</span> <span class='id identifier rubyid_peek'>peek</span><span class='lparen'>(</span> <span class='id identifier rubyid_count'>count</span> <span class='op'>=</span> <span class='int'>0</span> <span class='rparen'>)</span>
|
2597
2688
|
<span class='id identifier rubyid_view_range'>view_range</span><span class='lparen'>(</span> <span class='ivar'>@line</span><span class='op'>-</span><span class='id identifier rubyid_count'>count</span><span class='comma'>,</span> <span class='ivar'>@line</span><span class='op'>+</span><span class='id identifier rubyid_count'>count</span><span class='op'>+</span><span class='int'>1</span> <span class='rparen'>)</span>
|
@@ -2605,7 +2696,7 @@ success.</p>
|
|
2605
2696
|
<div class="method_details ">
|
2606
2697
|
<h3 class="signature " id="peek_ln-instance_method">
|
2607
2698
|
|
2608
|
-
|
2699
|
+
#<strong>peek_ln</strong>(count = 0) ⇒ <tt>Object</tt>
|
2609
2700
|
|
2610
2701
|
|
2611
2702
|
|
@@ -2628,13 +2719,13 @@ success.</p>
|
|
2628
2719
|
<pre class="lines">
|
2629
2720
|
|
2630
2721
|
|
2631
|
-
|
2632
|
-
|
2633
|
-
|
2634
|
-
|
2722
|
+
366
|
2723
|
+
367
|
2724
|
+
368
|
2725
|
+
369</pre>
|
2635
2726
|
</td>
|
2636
2727
|
<td>
|
2637
|
-
<pre class="code"><span class="info file"># File 'lib/patman.rb', line
|
2728
|
+
<pre class="code"><span class="info file"># File 'lib/patman.rb', line 366</span>
|
2638
2729
|
|
2639
2730
|
<span class='kw'>def</span> <span class='id identifier rubyid_peek_ln'>peek_ln</span><span class='lparen'>(</span> <span class='id identifier rubyid_count'>count</span> <span class='op'>=</span> <span class='int'>0</span> <span class='rparen'>)</span>
|
2640
2731
|
<span class='id identifier rubyid_view_range'>view_range</span><span class='lparen'>(</span> <span class='ivar'>@line</span><span class='op'>-</span><span class='id identifier rubyid_count'>count</span><span class='comma'>,</span> <span class='ivar'>@line</span><span class='op'>+</span><span class='id identifier rubyid_count'>count</span><span class='op'>+</span><span class='int'>1</span><span class='comma'>,</span> <span class='kw'>true</span> <span class='rparen'>)</span>
|
@@ -2648,7 +2739,7 @@ success.</p>
|
|
2648
2739
|
<div class="method_details ">
|
2649
2740
|
<h3 class="signature " id="read-instance_method">
|
2650
2741
|
|
2651
|
-
|
2742
|
+
#<strong>read</strong>(file = @file) ⇒ <tt>Object</tt>
|
2652
2743
|
|
2653
2744
|
|
2654
2745
|
|
@@ -2671,22 +2762,22 @@ success.</p>
|
|
2671
2762
|
<pre class="lines">
|
2672
2763
|
|
2673
2764
|
|
2674
|
-
|
2675
|
-
|
2676
|
-
|
2677
|
-
|
2678
|
-
|
2679
|
-
|
2680
|
-
|
2765
|
+
56
|
2766
|
+
57
|
2767
|
+
58
|
2768
|
+
59
|
2769
|
+
60
|
2770
|
+
61
|
2771
|
+
62</pre>
|
2681
2772
|
</td>
|
2682
2773
|
<td>
|
2683
|
-
<pre class="code"><span class="info file"># File 'lib/patman.rb', line
|
2774
|
+
<pre class="code"><span class="info file"># File 'lib/patman.rb', line 56</span>
|
2684
2775
|
|
2685
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_read'>read</span>
|
2686
|
-
<span class='kw'>if</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_exist?'>exist?</span><span class='lparen'>(</span> <span class='
|
2687
|
-
<span class='ivar'>@lines</span> <span class='op'>=</span> <span class='id identifier rubyid_read_clean'>read_clean</span><span class='lparen'>(</span> <span class='
|
2776
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_read'>read</span><span class='lparen'>(</span> <span class='id identifier rubyid_file'>file</span> <span class='op'>=</span> <span class='ivar'>@file</span> <span class='rparen'>)</span>
|
2777
|
+
<span class='kw'>if</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_exist?'>exist?</span><span class='lparen'>(</span> <span class='id identifier rubyid_file'>file</span> <span class='rparen'>)</span>
|
2778
|
+
<span class='ivar'>@lines</span> <span class='op'>=</span> <span class='id identifier rubyid_read_clean'>read_clean</span><span class='lparen'>(</span> <span class='id identifier rubyid_file'>file</span> <span class='rparen'>)</span>
|
2688
2779
|
<span class='kw'>else</span>
|
2689
|
-
<span class='id identifier rubyid_raise'>raise</span> <span class='const'>PatmanFileError</span>
|
2780
|
+
<span class='id identifier rubyid_raise'>raise</span> <span class='const'><span class='object_link'><a href="Patman/PatmanFileError.html" title="Patman::PatmanFileError (class)">PatmanFileError</a></span></span>
|
2690
2781
|
<span class='kw'>end</span>
|
2691
2782
|
<span class='kw'>end</span></pre>
|
2692
2783
|
</td>
|
@@ -2697,7 +2788,7 @@ success.</p>
|
|
2697
2788
|
<div class="method_details ">
|
2698
2789
|
<h3 class="signature " id="ref-instance_method">
|
2699
2790
|
|
2700
|
-
|
2791
|
+
#<strong>ref</strong>(line = nil) ⇒ <tt>Object</tt>
|
2701
2792
|
|
2702
2793
|
|
2703
2794
|
|
@@ -2720,16 +2811,16 @@ success.</p>
|
|
2720
2811
|
<pre class="lines">
|
2721
2812
|
|
2722
2813
|
|
2723
|
-
|
2724
|
-
|
2725
|
-
|
2726
|
-
|
2727
|
-
|
2728
|
-
|
2729
|
-
|
2814
|
+
155
|
2815
|
+
156
|
2816
|
+
157
|
2817
|
+
158
|
2818
|
+
159
|
2819
|
+
160
|
2820
|
+
161</pre>
|
2730
2821
|
</td>
|
2731
2822
|
<td>
|
2732
|
-
<pre class="code"><span class="info file"># File 'lib/patman.rb', line
|
2823
|
+
<pre class="code"><span class="info file"># File 'lib/patman.rb', line 155</span>
|
2733
2824
|
|
2734
2825
|
<span class='kw'>def</span> <span class='id identifier rubyid_ref'>ref</span><span class='lparen'>(</span> <span class='id identifier rubyid_line'>line</span> <span class='op'>=</span> <span class='kw'>nil</span> <span class='rparen'>)</span>
|
2735
2826
|
<span class='kw'>if</span> <span class='id identifier rubyid_line'>line</span>
|
@@ -2746,7 +2837,7 @@ success.</p>
|
|
2746
2837
|
<div class="method_details ">
|
2747
2838
|
<h3 class="signature " id="search-instance_method">
|
2748
2839
|
|
2749
|
-
|
2840
|
+
#<strong>search</strong>(re_or_str, forward = true) ⇒ <tt>Object</tt>
|
2750
2841
|
|
2751
2842
|
|
2752
2843
|
|
@@ -2770,13 +2861,13 @@ success.</p>
|
|
2770
2861
|
<pre class="lines">
|
2771
2862
|
|
2772
2863
|
|
2773
|
-
|
2774
|
-
|
2775
|
-
|
2776
|
-
|
2864
|
+
263
|
2865
|
+
264
|
2866
|
+
265
|
2867
|
+
266</pre>
|
2777
2868
|
</td>
|
2778
2869
|
<td>
|
2779
|
-
<pre class="code"><span class="info file"># File 'lib/patman.rb', line
|
2870
|
+
<pre class="code"><span class="info file"># File 'lib/patman.rb', line 263</span>
|
2780
2871
|
|
2781
2872
|
<span class='kw'>def</span> <span class='id identifier rubyid_search'>search</span><span class='lparen'>(</span> <span class='id identifier rubyid_re_or_str'>re_or_str</span><span class='comma'>,</span> <span class='id identifier rubyid_forward'>forward</span> <span class='op'>=</span> <span class='kw'>true</span> <span class='rparen'>)</span>
|
2782
2873
|
<span class='ivar'>@line</span> <span class='op'>=</span> <span class='id identifier rubyid_search_with_exception'>search_with_exception</span><span class='lparen'>(</span> <span class='id identifier rubyid_re_or_str'>re_or_str</span><span class='comma'>,</span> <span class='id identifier rubyid_forward'>forward</span> <span class='rparen'>)</span>
|
@@ -2790,7 +2881,7 @@ success.</p>
|
|
2790
2881
|
<div class="method_details ">
|
2791
2882
|
<h3 class="signature " id="set-instance_method">
|
2792
2883
|
|
2793
|
-
|
2884
|
+
#<strong>set</strong>(text) ⇒ <tt>Object</tt>
|
2794
2885
|
|
2795
2886
|
|
2796
2887
|
|
@@ -2813,14 +2904,14 @@ success.</p>
|
|
2813
2904
|
<pre class="lines">
|
2814
2905
|
|
2815
2906
|
|
2816
|
-
|
2817
|
-
|
2818
|
-
|
2819
|
-
|
2820
|
-
|
2907
|
+
164
|
2908
|
+
165
|
2909
|
+
166
|
2910
|
+
167
|
2911
|
+
168</pre>
|
2821
2912
|
</td>
|
2822
2913
|
<td>
|
2823
|
-
<pre class="code"><span class="info file"># File 'lib/patman.rb', line
|
2914
|
+
<pre class="code"><span class="info file"># File 'lib/patman.rb', line 164</span>
|
2824
2915
|
|
2825
2916
|
<span class='kw'>def</span> <span class='id identifier rubyid_set'>set</span><span class='lparen'>(</span> <span class='id identifier rubyid_text'>text</span> <span class='rparen'>)</span>
|
2826
2917
|
<span class='ivar'>@edited</span> <span class='op'>=</span> <span class='kw'>true</span>
|
@@ -2835,7 +2926,7 @@ success.</p>
|
|
2835
2926
|
<div class="method_details ">
|
2836
2927
|
<h3 class="signature " id="step-instance_method">
|
2837
2928
|
|
2838
|
-
|
2929
|
+
#<strong>step</strong>(dir = 1) ⇒ <tt>Object</tt>
|
2839
2930
|
|
2840
2931
|
|
2841
2932
|
|
@@ -2858,13 +2949,13 @@ success.</p>
|
|
2858
2949
|
<pre class="lines">
|
2859
2950
|
|
2860
2951
|
|
2861
|
-
|
2862
|
-
|
2863
|
-
|
2864
|
-
|
2952
|
+
105
|
2953
|
+
106
|
2954
|
+
107
|
2955
|
+
108</pre>
|
2865
2956
|
</td>
|
2866
2957
|
<td>
|
2867
|
-
<pre class="code"><span class="info file"># File 'lib/patman.rb', line
|
2958
|
+
<pre class="code"><span class="info file"># File 'lib/patman.rb', line 105</span>
|
2868
2959
|
|
2869
2960
|
<span class='kw'>def</span> <span class='id identifier rubyid_step'>step</span><span class='lparen'>(</span> <span class='id identifier rubyid_dir'>dir</span> <span class='op'>=</span> <span class='int'>1</span> <span class='rparen'>)</span>
|
2870
2961
|
<span class='ivar'>@line</span> <span class='op'>=</span> <span class='ivar'>@line</span> <span class='op'>+</span> <span class='id identifier rubyid_dir'>dir</span>
|
@@ -2878,7 +2969,7 @@ success.</p>
|
|
2878
2969
|
<div class="method_details ">
|
2879
2970
|
<h3 class="signature " id="sub-instance_method">
|
2880
2971
|
|
2881
|
-
|
2972
|
+
#<strong>sub</strong>(from, to) ⇒ <tt>Object</tt>
|
2882
2973
|
|
2883
2974
|
|
2884
2975
|
|
@@ -2901,14 +2992,14 @@ success.</p>
|
|
2901
2992
|
<pre class="lines">
|
2902
2993
|
|
2903
2994
|
|
2904
|
-
|
2905
|
-
|
2906
|
-
|
2907
|
-
|
2908
|
-
|
2995
|
+
171
|
2996
|
+
172
|
2997
|
+
173
|
2998
|
+
174
|
2999
|
+
175</pre>
|
2909
3000
|
</td>
|
2910
3001
|
<td>
|
2911
|
-
<pre class="code"><span class="info file"># File 'lib/patman.rb', line
|
3002
|
+
<pre class="code"><span class="info file"># File 'lib/patman.rb', line 171</span>
|
2912
3003
|
|
2913
3004
|
<span class='kw'>def</span> <span class='id identifier rubyid_sub'>sub</span><span class='lparen'>(</span> <span class='id identifier rubyid_from'>from</span><span class='comma'>,</span> <span class='id identifier rubyid_to'>to</span> <span class='rparen'>)</span>
|
2914
3005
|
<span class='ivar'>@edited</span> <span class='op'>=</span> <span class='kw'>true</span>
|
@@ -2923,7 +3014,7 @@ success.</p>
|
|
2923
3014
|
<div class="method_details ">
|
2924
3015
|
<h3 class="signature " id="unmark-instance_method">
|
2925
3016
|
|
2926
|
-
|
3017
|
+
#<strong>unmark</strong>(tag = nil) ⇒ <tt>Object</tt>
|
2927
3018
|
|
2928
3019
|
|
2929
3020
|
|
@@ -2946,21 +3037,21 @@ success.</p>
|
|
2946
3037
|
<pre class="lines">
|
2947
3038
|
|
2948
3039
|
|
2949
|
-
|
2950
|
-
|
2951
|
-
|
2952
|
-
|
2953
|
-
|
2954
|
-
|
2955
|
-
|
2956
|
-
|
2957
|
-
|
2958
|
-
|
2959
|
-
|
2960
|
-
|
3040
|
+
309
|
3041
|
+
310
|
3042
|
+
311
|
3043
|
+
312
|
3044
|
+
313
|
3045
|
+
314
|
3046
|
+
315
|
3047
|
+
316
|
3048
|
+
317
|
3049
|
+
318
|
3050
|
+
319
|
3051
|
+
320</pre>
|
2961
3052
|
</td>
|
2962
3053
|
<td>
|
2963
|
-
<pre class="code"><span class="info file"># File 'lib/patman.rb', line
|
3054
|
+
<pre class="code"><span class="info file"># File 'lib/patman.rb', line 309</span>
|
2964
3055
|
|
2965
3056
|
<span class='kw'>def</span> <span class='id identifier rubyid_unmark'>unmark</span><span class='lparen'>(</span> <span class='id identifier rubyid_tag'>tag</span> <span class='op'>=</span> <span class='kw'>nil</span> <span class='rparen'>)</span>
|
2966
3057
|
<span class='kw'>if</span> <span class='id identifier rubyid_tag'>tag</span> <span class='op'>&&</span> <span class='ivar'>@marks</span><span class='lbracket'>[</span> <span class='id identifier rubyid_tag'>tag</span> <span class='rbracket'>]</span>
|
@@ -2982,7 +3073,7 @@ success.</p>
|
|
2982
3073
|
<div class="method_details ">
|
2983
3074
|
<h3 class="signature " id="update-instance_method">
|
2984
3075
|
|
2985
|
-
|
3076
|
+
#<strong>update</strong>(&blk) ⇒ <tt>Object</tt>
|
2986
3077
|
|
2987
3078
|
|
2988
3079
|
|
@@ -3017,14 +3108,14 @@ given block. Hence last stmt should include the new line content.</p>
|
|
3017
3108
|
<pre class="lines">
|
3018
3109
|
|
3019
3110
|
|
3020
|
-
|
3021
|
-
|
3022
|
-
|
3023
|
-
|
3024
|
-
|
3111
|
+
187
|
3112
|
+
188
|
3113
|
+
189
|
3114
|
+
190
|
3115
|
+
191</pre>
|
3025
3116
|
</td>
|
3026
3117
|
<td>
|
3027
|
-
<pre class="code"><span class="info file"># File 'lib/patman.rb', line
|
3118
|
+
<pre class="code"><span class="info file"># File 'lib/patman.rb', line 187</span>
|
3028
3119
|
|
3029
3120
|
<span class='kw'>def</span> <span class='id identifier rubyid_update'>update</span><span class='lparen'>(</span> <span class='op'>&</span><span class='id identifier rubyid_blk'>blk</span> <span class='rparen'>)</span>
|
3030
3121
|
<span class='ivar'>@edited</span> <span class='op'>=</span> <span class='kw'>true</span>
|
@@ -3039,7 +3130,7 @@ given block. Hence last stmt should include the new line content.</p>
|
|
3039
3130
|
<div class="method_details ">
|
3040
3131
|
<h3 class="signature " id="view-instance_method">
|
3041
3132
|
|
3042
|
-
|
3133
|
+
#<strong>view</strong>(arg1 = nil, arg2 = nil) ⇒ <tt>Object</tt>
|
3043
3134
|
|
3044
3135
|
|
3045
3136
|
|
@@ -3069,19 +3160,19 @@ given block. Hence last stmt should include the new line content.</p>
|
|
3069
3160
|
<pre class="lines">
|
3070
3161
|
|
3071
3162
|
|
3072
|
-
|
3073
|
-
|
3074
|
-
|
3075
|
-
|
3076
|
-
|
3077
|
-
|
3078
|
-
|
3079
|
-
|
3080
|
-
|
3081
|
-
|
3163
|
+
376
|
3164
|
+
377
|
3165
|
+
378
|
3166
|
+
379
|
3167
|
+
380
|
3168
|
+
381
|
3169
|
+
382
|
3170
|
+
383
|
3171
|
+
384
|
3172
|
+
385</pre>
|
3082
3173
|
</td>
|
3083
3174
|
<td>
|
3084
|
-
<pre class="code"><span class="info file"># File 'lib/patman.rb', line
|
3175
|
+
<pre class="code"><span class="info file"># File 'lib/patman.rb', line 376</span>
|
3085
3176
|
|
3086
3177
|
<span class='kw'>def</span> <span class='id identifier rubyid_view'>view</span><span class='lparen'>(</span> <span class='id identifier rubyid_arg1'>arg1</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_arg2'>arg2</span> <span class='op'>=</span> <span class='kw'>nil</span> <span class='rparen'>)</span>
|
3087
3178
|
<span class='kw'>if</span> <span class='op'>!</span><span class='id identifier rubyid_arg1'>arg1</span> <span class='op'>&&</span> <span class='op'>!</span><span class='id identifier rubyid_arg2'>arg2</span>
|
@@ -3101,7 +3192,7 @@ given block. Hence last stmt should include the new line content.</p>
|
|
3101
3192
|
<div class="method_details ">
|
3102
3193
|
<h3 class="signature " id="view_ln-instance_method">
|
3103
3194
|
|
3104
|
-
|
3195
|
+
#<strong>view_ln</strong>(arg1 = nil, arg2 = nil) ⇒ <tt>Object</tt>
|
3105
3196
|
|
3106
3197
|
|
3107
3198
|
|
@@ -3131,19 +3222,19 @@ given block. Hence last stmt should include the new line content.</p>
|
|
3131
3222
|
<pre class="lines">
|
3132
3223
|
|
3133
3224
|
|
3134
|
-
|
3135
|
-
|
3136
|
-
|
3137
|
-
|
3138
|
-
|
3139
|
-
|
3140
|
-
|
3141
|
-
|
3142
|
-
|
3143
|
-
|
3225
|
+
392
|
3226
|
+
393
|
3227
|
+
394
|
3228
|
+
395
|
3229
|
+
396
|
3230
|
+
397
|
3231
|
+
398
|
3232
|
+
399
|
3233
|
+
400
|
3234
|
+
401</pre>
|
3144
3235
|
</td>
|
3145
3236
|
<td>
|
3146
|
-
<pre class="code"><span class="info file"># File 'lib/patman.rb', line
|
3237
|
+
<pre class="code"><span class="info file"># File 'lib/patman.rb', line 392</span>
|
3147
3238
|
|
3148
3239
|
<span class='kw'>def</span> <span class='id identifier rubyid_view_ln'>view_ln</span><span class='lparen'>(</span> <span class='id identifier rubyid_arg1'>arg1</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_arg2'>arg2</span> <span class='op'>=</span> <span class='kw'>nil</span> <span class='rparen'>)</span>
|
3149
3240
|
<span class='kw'>if</span> <span class='op'>!</span><span class='id identifier rubyid_arg1'>arg1</span> <span class='op'>&&</span> <span class='op'>!</span><span class='id identifier rubyid_arg2'>arg2</span>
|
@@ -3163,7 +3254,7 @@ given block. Hence last stmt should include the new line content.</p>
|
|
3163
3254
|
<div class="method_details ">
|
3164
3255
|
<h3 class="signature " id="write-instance_method">
|
3165
3256
|
|
3166
|
-
|
3257
|
+
#<strong>write</strong>(file = @file) ⇒ <tt>Object</tt>
|
3167
3258
|
|
3168
3259
|
|
3169
3260
|
|
@@ -3186,27 +3277,43 @@ given block. Hence last stmt should include the new line content.</p>
|
|
3186
3277
|
<pre class="lines">
|
3187
3278
|
|
3188
3279
|
|
3189
|
-
|
3190
|
-
|
3191
|
-
|
3192
|
-
|
3193
|
-
|
3194
|
-
|
3195
|
-
|
3196
|
-
|
3197
|
-
|
3198
|
-
|
3199
|
-
|
3200
|
-
|
3201
|
-
|
3202
|
-
|
3280
|
+
65
|
3281
|
+
66
|
3282
|
+
67
|
3283
|
+
68
|
3284
|
+
69
|
3285
|
+
70
|
3286
|
+
71
|
3287
|
+
72
|
3288
|
+
73
|
3289
|
+
74
|
3290
|
+
75
|
3291
|
+
76
|
3292
|
+
77
|
3293
|
+
78
|
3294
|
+
79
|
3295
|
+
80
|
3296
|
+
81
|
3297
|
+
82
|
3298
|
+
83
|
3299
|
+
84
|
3300
|
+
85
|
3301
|
+
86</pre>
|
3203
3302
|
</td>
|
3204
3303
|
<td>
|
3205
|
-
<pre class="code"><span class="info file"># File 'lib/patman.rb', line
|
3304
|
+
<pre class="code"><span class="info file"># File 'lib/patman.rb', line 65</span>
|
3206
3305
|
|
3207
3306
|
<span class='kw'>def</span> <span class='id identifier rubyid_write'>write</span><span class='lparen'>(</span> <span class='id identifier rubyid_file'>file</span> <span class='op'>=</span> <span class='ivar'>@file</span> <span class='rparen'>)</span>
|
3208
3307
|
<span class='kw'>return</span> <span class='kw'>unless</span> <span class='ivar'>@edited</span>
|
3308
|
+
|
3309
|
+
<span class='id identifier rubyid_file_dir'>file_dir</span> <span class='op'>=</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_dirname'>dirname</span><span class='lparen'>(</span> <span class='id identifier rubyid_file'>file</span> <span class='rparen'>)</span>
|
3310
|
+
<span class='kw'>unless</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_exist?'>exist?</span><span class='lparen'>(</span> <span class='id identifier rubyid_file_dir'>file_dir</span> <span class='rparen'>)</span>
|
3311
|
+
<span class='id identifier rubyid_require'>require</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>fileutils</span><span class='tstring_end'>'</span></span>
|
3312
|
+
<span class='const'>FileUtils</span><span class='period'>.</span><span class='id identifier rubyid_mkdir_p'>mkdir_p</span><span class='lparen'>(</span> <span class='id identifier rubyid_file_dir'>file_dir</span> <span class='rparen'>)</span>
|
3313
|
+
<span class='kw'>end</span>
|
3314
|
+
|
3209
3315
|
<span class='id identifier rubyid_fh'>fh</span> <span class='op'>=</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_open'>open</span><span class='lparen'>(</span> <span class='id identifier rubyid_file'>file</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>w</span><span class='tstring_end'>'</span></span> <span class='rparen'>)</span>
|
3316
|
+
|
3210
3317
|
<span class='ivar'>@lines</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_line'>line</span><span class='op'>|</span>
|
3211
3318
|
<span class='kw'>if</span> <span class='id identifier rubyid_line'>line</span>
|
3212
3319
|
<span class='id identifier rubyid_fh'>fh</span><span class='period'>.</span><span class='id identifier rubyid_puts'>puts</span> <span class='id identifier rubyid_line'>line</span>
|
@@ -3227,11 +3334,12 @@ given block. Hence last stmt should include the new line content.</p>
|
|
3227
3334
|
|
3228
3335
|
</div>
|
3229
3336
|
|
3230
|
-
|
3231
|
-
Generated on
|
3337
|
+
<div id="footer">
|
3338
|
+
Generated on Sat Oct 20 17:33:29 2018 by
|
3232
3339
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
3233
|
-
0.
|
3340
|
+
0.9.16 (ruby-2.5.1).
|
3234
3341
|
</div>
|
3235
3342
|
|
3343
|
+
</div>
|
3236
3344
|
</body>
|
3237
3345
|
</html>
|