rook 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/LGPL +504 -0
- data/README.txt +15 -6
- data/bin/rook +1 -1
- data/doc-api/classes/BZ2/Reader.html +24 -24
- data/doc-api/classes/Digest/Base.html +18 -18
- data/doc-api/classes/Enumerable.html +55 -55
- data/doc-api/classes/File.html +53 -6
- data/doc-api/classes/FileUtils.html +90 -90
- data/doc-api/classes/Kernel.html +48 -48
- data/doc-api/classes/Rook.html +18 -5
- data/doc-api/classes/Rook/Assertion.html +29 -14
- data/doc-api/classes/Rook/Commands.html +296 -364
- data/doc-api/classes/Rook/Cookbook.html +165 -60
- data/doc-api/classes/Rook/CookbookError.html +7 -7
- data/doc-api/classes/Rook/CookbookValidator.html +24 -24
- data/doc-api/classes/Rook/Kitchen.html +379 -224
- data/doc-api/classes/Rook/KitchenHelper.html +69 -69
- data/doc-api/classes/Rook/Main.html +47 -30
- data/doc-api/classes/Rook/Recipe.html +63 -35
- data/doc-api/classes/Rook/Util.html +72 -68
- data/doc-api/classes/Rook/Util/UndefinedPropertyError.html +6 -6
- data/doc-api/classes/Rook/{Parameters.html → ValueTable.html} +129 -123
- data/doc-api/created.rid +1 -1
- data/doc-api/files/rook/commands_rb.html +2 -2
- data/doc-api/files/rook/cookbook_rb.html +2 -2
- data/doc-api/files/rook/helper/bz2_rb.html +1 -1
- data/doc-api/files/rook/helper/digest_rb.html +1 -1
- data/doc-api/files/rook/helper/enumerable_rb.html +1 -1
- data/doc-api/files/rook/helper/file_rb.html +2 -2
- data/doc-api/files/rook/helper/fileutils_rb.html +1 -1
- data/doc-api/files/rook/helper/kernel_rb.html +1 -1
- data/doc-api/files/rook/kitchen_rb.html +2 -2
- data/doc-api/files/rook/main_rb.html +2 -2
- data/doc-api/files/rook/recipe_rb.html +2 -2
- data/doc-api/files/rook/util_rb.html +2 -2
- data/doc-api/files/rook_rb.html +2 -2
- data/doc-api/fr_class_index.html +1 -1
- data/doc-api/fr_file_index.html +0 -1
- data/doc-api/fr_method_index.html +148 -140
- data/doc-api/index.html +1 -1
- data/examples/hello_c/Rookbook.rb +1 -1
- data/examples/hello_c/Rookbook.yaml +8 -8
- data/examples/project/README.txt +2 -2
- data/examples/project/Rookbook.rb +20 -19
- data/examples/project/Rookbook.yaml +30 -28
- data/examples/project/bin/example +2 -2
- data/examples/project/example.gemspec +1 -1
- data/examples/project/lib/example.rb +2 -2
- data/examples/project/test/test.rb +2 -2
- data/lib/rook.rb +5 -2
- data/lib/rook/commands.rb +28 -17
- data/lib/rook/cookbook.rb +107 -92
- data/lib/rook/helper/bz2.rb +1 -1
- data/lib/rook/helper/digest.rb +1 -1
- data/lib/rook/helper/enumerable.rb +1 -1
- data/lib/rook/helper/file.rb +28 -3
- data/lib/rook/helper/fileutils.rb +1 -1
- data/lib/rook/helper/kernel.rb +1 -1
- data/lib/rook/kitchen.rb +138 -100
- data/lib/rook/main.rb +72 -47
- data/lib/rook/recipe.rb +51 -35
- data/lib/rook/rookbook.schema.yaml +34 -54
- data/lib/rook/util.rb +22 -8
- data/rook.gemspec +5 -5
- metadata +5 -7
- data/COPYING +0 -340
- data/doc-api/files/__/README_txt.html +0 -313
data/README.txt
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
= README
|
2
2
|
|
3
|
-
release:: $Release: 0.
|
3
|
+
release:: $Release: 0.2.0 $
|
4
4
|
copyright:: copyright(c) 2006 kuwata-lab.com all rights reserved.
|
5
5
|
|
6
6
|
|
@@ -111,9 +111,11 @@ which is equivarent to the above YAML-style example.
|
|
111
111
|
See 'examples/' directory for more examples.
|
112
112
|
|
113
113
|
|
114
|
+
|
114
115
|
== Documents
|
115
116
|
|
116
|
-
|
117
|
+
See 'doc/users-guide.html' for details.
|
118
|
+
|
117
119
|
|
118
120
|
|
119
121
|
== Terms
|
@@ -146,15 +148,22 @@ Sorry, there is no documentation.
|
|
146
148
|
|
147
149
|
== To Do
|
148
150
|
|
149
|
-
* [_]
|
150
|
-
* [_]
|
151
|
+
* [_] Include external cookbook
|
152
|
+
* [_] Fingerprints support
|
151
153
|
* [_] Dependency Tree
|
152
154
|
* [_] Plugin architecture
|
153
|
-
|
155
|
+
* [_] Auto-detection of product and by-product, and delete them automatically
|
156
|
+
* [_] Multi-products
|
157
|
+
* [V] (DONE) Reporting Line number when schema error is found in cookbook
|
158
|
+
* [_] Convertion cookbook into ruby code
|
154
159
|
|
155
160
|
|
156
161
|
== License
|
157
162
|
|
158
|
-
|
163
|
+
LGPL ver2.1
|
164
|
+
|
165
|
+
|
159
166
|
|
167
|
+
== Author
|
160
168
|
|
169
|
+
makoto kuwata <kwa(at)kuwata-lab.com>
|
data/bin/rook
CHANGED
@@ -86,10 +86,10 @@
|
|
86
86
|
<h3 class="section-bar">Methods</h3>
|
87
87
|
|
88
88
|
<div class="name-list">
|
89
|
-
<a href="#
|
90
|
-
<a href="#
|
91
|
-
<a href="#
|
92
|
-
<a href="#
|
89
|
+
<a href="#M000140">new</a>
|
90
|
+
<a href="#M000141">pos</a>
|
91
|
+
<a href="#M000142">pos=</a>
|
92
|
+
<a href="#M000143">rewind</a>
|
93
93
|
</div>
|
94
94
|
</div>
|
95
95
|
|
@@ -124,19 +124,19 @@
|
|
124
124
|
<div id="methods">
|
125
125
|
<h3 class="section-bar">Public Class methods</h3>
|
126
126
|
|
127
|
-
<div id="method-
|
128
|
-
<a name="
|
127
|
+
<div id="method-M000140" class="method-detail">
|
128
|
+
<a name="M000140"></a>
|
129
129
|
|
130
130
|
<div class="method-heading">
|
131
|
-
<a href="#
|
131
|
+
<a href="#M000140" class="method-signature">
|
132
132
|
<span class="method-name">new</span><span class="method-args">(object, small=false)</span>
|
133
133
|
</a>
|
134
134
|
</div>
|
135
135
|
|
136
136
|
<div class="method-description">
|
137
137
|
<p><a class="source-toggle" href="#"
|
138
|
-
onclick="toggleCode('
|
139
|
-
<div class="method-source-code" id="
|
138
|
+
onclick="toggleCode('M000140-source');return false;">[Source]</a></p>
|
139
|
+
<div class="method-source-code" id="M000140-source">
|
140
140
|
<pre>
|
141
141
|
<span class="ruby-comment cmt"># File rook/helper/bz2.rb, line 19</span>
|
142
142
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">object</span>, <span class="ruby-identifier">small</span>=<span class="ruby-keyword kw">false</span>)
|
@@ -150,19 +150,19 @@
|
|
150
150
|
|
151
151
|
<h3 class="section-bar">Public Instance methods</h3>
|
152
152
|
|
153
|
-
<div id="method-
|
154
|
-
<a name="
|
153
|
+
<div id="method-M000141" class="method-detail">
|
154
|
+
<a name="M000141"></a>
|
155
155
|
|
156
156
|
<div class="method-heading">
|
157
|
-
<a href="#
|
157
|
+
<a href="#M000141" class="method-signature">
|
158
158
|
<span class="method-name">pos</span><span class="method-args">()</span>
|
159
159
|
</a>
|
160
160
|
</div>
|
161
161
|
|
162
162
|
<div class="method-description">
|
163
163
|
<p><a class="source-toggle" href="#"
|
164
|
-
onclick="toggleCode('
|
165
|
-
<div class="method-source-code" id="
|
164
|
+
onclick="toggleCode('M000141-source');return false;">[Source]</a></p>
|
165
|
+
<div class="method-source-code" id="M000141-source">
|
166
166
|
<pre>
|
167
167
|
<span class="ruby-comment cmt"># File rook/helper/bz2.rb, line 24</span>
|
168
168
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">pos</span>
|
@@ -173,19 +173,19 @@
|
|
173
173
|
</div>
|
174
174
|
</div>
|
175
175
|
|
176
|
-
<div id="method-
|
177
|
-
<a name="
|
176
|
+
<div id="method-M000142" class="method-detail">
|
177
|
+
<a name="M000142"></a>
|
178
178
|
|
179
179
|
<div class="method-heading">
|
180
|
-
<a href="#
|
180
|
+
<a href="#M000142" class="method-signature">
|
181
181
|
<span class="method-name">pos=</span><span class="method-args">(index)</span>
|
182
182
|
</a>
|
183
183
|
</div>
|
184
184
|
|
185
185
|
<div class="method-description">
|
186
186
|
<p><a class="source-toggle" href="#"
|
187
|
-
onclick="toggleCode('
|
188
|
-
<div class="method-source-code" id="
|
187
|
+
onclick="toggleCode('M000142-source');return false;">[Source]</a></p>
|
188
|
+
<div class="method-source-code" id="M000142-source">
|
189
189
|
<pre>
|
190
190
|
<span class="ruby-comment cmt"># File rook/helper/bz2.rb, line 28</span>
|
191
191
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">pos=</span>(<span class="ruby-identifier">index</span>)
|
@@ -196,19 +196,19 @@
|
|
196
196
|
</div>
|
197
197
|
</div>
|
198
198
|
|
199
|
-
<div id="method-
|
200
|
-
<a name="
|
199
|
+
<div id="method-M000143" class="method-detail">
|
200
|
+
<a name="M000143"></a>
|
201
201
|
|
202
202
|
<div class="method-heading">
|
203
|
-
<a href="#
|
203
|
+
<a href="#M000143" class="method-signature">
|
204
204
|
<span class="method-name">rewind</span><span class="method-args">()</span>
|
205
205
|
</a>
|
206
206
|
</div>
|
207
207
|
|
208
208
|
<div class="method-description">
|
209
209
|
<p><a class="source-toggle" href="#"
|
210
|
-
onclick="toggleCode('
|
211
|
-
<div class="method-source-code" id="
|
210
|
+
onclick="toggleCode('M000143-source');return false;">[Source]</a></p>
|
211
|
+
<div class="method-source-code" id="M000143-source">
|
212
212
|
<pre>
|
213
213
|
<span class="ruby-comment cmt"># File rook/helper/bz2.rb, line 32</span>
|
214
214
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">rewind</span>
|
@@ -86,9 +86,9 @@
|
|
86
86
|
<h3 class="section-bar">Methods</h3>
|
87
87
|
|
88
88
|
<div class="name-list">
|
89
|
-
<a href="#
|
90
|
-
<a href="#
|
91
|
-
<a href="#
|
89
|
+
<a href="#M000161">create_from_file</a>
|
90
|
+
<a href="#M000163">file_digest</a>
|
91
|
+
<a href="#M000162">file_hexdigest</a>
|
92
92
|
</div>
|
93
93
|
</div>
|
94
94
|
|
@@ -110,11 +110,11 @@
|
|
110
110
|
<div id="methods">
|
111
111
|
<h3 class="section-bar">Public Class methods</h3>
|
112
112
|
|
113
|
-
<div id="method-
|
114
|
-
<a name="
|
113
|
+
<div id="method-M000161" class="method-detail">
|
114
|
+
<a name="M000161"></a>
|
115
115
|
|
116
116
|
<div class="method-heading">
|
117
|
-
<a href="#
|
117
|
+
<a href="#M000161" class="method-signature">
|
118
118
|
<span class="method-name">create_from_file</span><span class="method-args">(filename)</span>
|
119
119
|
</a>
|
120
120
|
</div>
|
@@ -137,8 +137,8 @@ this is faster than
|
|
137
137
|
file size is large.
|
138
138
|
</p>
|
139
139
|
<p><a class="source-toggle" href="#"
|
140
|
-
onclick="toggleCode('
|
141
|
-
<div class="method-source-code" id="
|
140
|
+
onclick="toggleCode('M000161-source');return false;">[Source]</a></p>
|
141
|
+
<div class="method-source-code" id="M000161-source">
|
142
142
|
<pre>
|
143
143
|
<span class="ruby-comment cmt"># File rook/helper/digest.rb, line 26</span>
|
144
144
|
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">create_from_file</span>(<span class="ruby-identifier">filename</span>)
|
@@ -164,11 +164,11 @@ file size is large.
|
|
164
164
|
</div>
|
165
165
|
</div>
|
166
166
|
|
167
|
-
<div id="method-
|
168
|
-
<a name="
|
167
|
+
<div id="method-M000163" class="method-detail">
|
168
|
+
<a name="M000163"></a>
|
169
169
|
|
170
170
|
<div class="method-heading">
|
171
|
-
<a href="#
|
171
|
+
<a href="#M000163" class="method-signature">
|
172
172
|
<span class="method-name">file_digest</span><span class="method-args">(filename)</span>
|
173
173
|
</a>
|
174
174
|
</div>
|
@@ -189,8 +189,8 @@ this is faster than ‘Digest::MD5.digest(File.read(filename))’
|
|
189
189
|
when file size is large.
|
190
190
|
</p>
|
191
191
|
<p><a class="source-toggle" href="#"
|
192
|
-
onclick="toggleCode('
|
193
|
-
<div class="method-source-code" id="
|
192
|
+
onclick="toggleCode('M000163-source');return false;">[Source]</a></p>
|
193
|
+
<div class="method-source-code" id="M000163-source">
|
194
194
|
<pre>
|
195
195
|
<span class="ruby-comment cmt"># File rook/helper/digest.rb, line 71</span>
|
196
196
|
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">file_digest</span>(<span class="ruby-identifier">filename</span>)
|
@@ -201,11 +201,11 @@ when file size is large.
|
|
201
201
|
</div>
|
202
202
|
</div>
|
203
203
|
|
204
|
-
<div id="method-
|
205
|
-
<a name="
|
204
|
+
<div id="method-M000162" class="method-detail">
|
205
|
+
<a name="M000162"></a>
|
206
206
|
|
207
207
|
<div class="method-heading">
|
208
|
-
<a href="#
|
208
|
+
<a href="#M000162" class="method-signature">
|
209
209
|
<span class="method-name">file_hexdigest</span><span class="method-args">(filename)</span>
|
210
210
|
</a>
|
211
211
|
</div>
|
@@ -227,8 +227,8 @@ this is faster than
|
|
227
227
|
large.
|
228
228
|
</p>
|
229
229
|
<p><a class="source-toggle" href="#"
|
230
|
-
onclick="toggleCode('
|
231
|
-
<div class="method-source-code" id="
|
230
|
+
onclick="toggleCode('M000162-source');return false;">[Source]</a></p>
|
231
|
+
<div class="method-source-code" id="M000162-source">
|
232
232
|
<pre>
|
233
233
|
<span class="ruby-comment cmt"># File rook/helper/digest.rb, line 56</span>
|
234
234
|
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">file_hexdigest</span>(<span class="ruby-identifier">filename</span>)
|
@@ -74,7 +74,7 @@
|
|
74
74
|
|
75
75
|
<div id="description">
|
76
76
|
<p>
|
77
|
-
$Rev: 20 $ $Release: 0.
|
77
|
+
$Rev: 20 $ $Release: 0.2.0 $ copyright(c) 2006 kuwata-lab.com all rights reserved.
|
78
78
|
</p>
|
79
79
|
|
80
80
|
</div>
|
@@ -86,15 +86,15 @@ $Rev: 20 $ $Release: 0.1.0 $ copyright(c) 2006 kuwata-lab.com all rights reserve
|
|
86
86
|
<h3 class="section-bar">Methods</h3>
|
87
87
|
|
88
88
|
<div class="name-list">
|
89
|
-
<a href="#
|
90
|
-
<a href="#
|
91
|
-
<a href="#
|
92
|
-
<a href="#
|
93
|
-
<a href="#
|
94
|
-
<a href="#
|
95
|
-
<a href="#
|
96
|
-
<a href="#
|
97
|
-
<a href="#
|
89
|
+
<a href="#M000153">add_prefix</a>
|
90
|
+
<a href="#M000154">add_suffix</a>
|
91
|
+
<a href="#M000152">apply</a>
|
92
|
+
<a href="#M000159">basenames</a>
|
93
|
+
<a href="#M000158">delete_suffix</a>
|
94
|
+
<a href="#M000160">dirnames</a>
|
95
|
+
<a href="#M000157">each_gsub</a>
|
96
|
+
<a href="#M000156">each_sub</a>
|
97
|
+
<a href="#M000155">sandwich</a>
|
98
98
|
</div>
|
99
99
|
</div>
|
100
100
|
|
@@ -116,11 +116,11 @@ $Rev: 20 $ $Release: 0.1.0 $ copyright(c) 2006 kuwata-lab.com all rights reserve
|
|
116
116
|
<div id="methods">
|
117
117
|
<h3 class="section-bar">Public Instance methods</h3>
|
118
118
|
|
119
|
-
<div id="method-
|
120
|
-
<a name="
|
119
|
+
<div id="method-M000153" class="method-detail">
|
120
|
+
<a name="M000153"></a>
|
121
121
|
|
122
122
|
<div class="method-heading">
|
123
|
-
<a href="#
|
123
|
+
<a href="#M000153" class="method-signature">
|
124
124
|
<span class="method-name">add_prefix</span><span class="method-args">(prefix)</span>
|
125
125
|
</a>
|
126
126
|
</div>
|
@@ -136,8 +136,8 @@ ex.
|
|
136
136
|
['a', 'b', 'c'].add_prefix('dir/') #=> ["dir/a", "dir/b", "dir/c"]
|
137
137
|
</pre>
|
138
138
|
<p><a class="source-toggle" href="#"
|
139
|
-
onclick="toggleCode('
|
140
|
-
<div class="method-source-code" id="
|
139
|
+
onclick="toggleCode('M000153-source');return false;">[Source]</a></p>
|
140
|
+
<div class="method-source-code" id="M000153-source">
|
141
141
|
<pre>
|
142
142
|
<span class="ruby-comment cmt"># File rook/helper/enumerable.rb, line 28</span>
|
143
143
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_prefix</span>(<span class="ruby-identifier">prefix</span>)
|
@@ -148,11 +148,11 @@ ex.
|
|
148
148
|
</div>
|
149
149
|
</div>
|
150
150
|
|
151
|
-
<div id="method-
|
152
|
-
<a name="
|
151
|
+
<div id="method-M000154" class="method-detail">
|
152
|
+
<a name="M000154"></a>
|
153
153
|
|
154
154
|
<div class="method-heading">
|
155
|
-
<a href="#
|
155
|
+
<a href="#M000154" class="method-signature">
|
156
156
|
<span class="method-name">add_suffix</span><span class="method-args">(suffix)</span>
|
157
157
|
</a>
|
158
158
|
</div>
|
@@ -168,8 +168,8 @@ ex.
|
|
168
168
|
['a', 'b', 'c'].add_suffix('.txt') #=> ["a.txt", "b.txt", "c.txt"]
|
169
169
|
</pre>
|
170
170
|
<p><a class="source-toggle" href="#"
|
171
|
-
onclick="toggleCode('
|
172
|
-
<div class="method-source-code" id="
|
171
|
+
onclick="toggleCode('M000154-source');return false;">[Source]</a></p>
|
172
|
+
<div class="method-source-code" id="M000154-source">
|
173
173
|
<pre>
|
174
174
|
<span class="ruby-comment cmt"># File rook/helper/enumerable.rb, line 39</span>
|
175
175
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_suffix</span>(<span class="ruby-identifier">suffix</span>)
|
@@ -180,11 +180,11 @@ ex.
|
|
180
180
|
</div>
|
181
181
|
</div>
|
182
182
|
|
183
|
-
<div id="method-
|
184
|
-
<a name="
|
183
|
+
<div id="method-M000152" class="method-detail">
|
184
|
+
<a name="M000152"></a>
|
185
185
|
|
186
186
|
<div class="method-heading">
|
187
|
-
<a href="#
|
187
|
+
<a href="#M000152" class="method-signature">
|
188
188
|
<span class="method-name">apply</span><span class="method-args">(method_name, *args)</span>
|
189
189
|
</a>
|
190
190
|
</div>
|
@@ -200,8 +200,8 @@ ex.
|
|
200
200
|
[1, 2, 3].apply(:'+', 5) #=> [6, 7, 8]
|
201
201
|
</pre>
|
202
202
|
<p><a class="source-toggle" href="#"
|
203
|
-
onclick="toggleCode('
|
204
|
-
<div class="method-source-code" id="
|
203
|
+
onclick="toggleCode('M000152-source');return false;">[Source]</a></p>
|
204
|
+
<div class="method-source-code" id="M000152-source">
|
205
205
|
<pre>
|
206
206
|
<span class="ruby-comment cmt"># File rook/helper/enumerable.rb, line 17</span>
|
207
207
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">apply</span>(<span class="ruby-identifier">method_name</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
|
@@ -212,11 +212,11 @@ ex.
|
|
212
212
|
</div>
|
213
213
|
</div>
|
214
214
|
|
215
|
-
<div id="method-
|
216
|
-
<a name="
|
215
|
+
<div id="method-M000159" class="method-detail">
|
216
|
+
<a name="M000159"></a>
|
217
217
|
|
218
218
|
<div class="method-heading">
|
219
|
-
<a href="#
|
219
|
+
<a href="#M000159" class="method-signature">
|
220
220
|
<span class="method-name">basenames</span><span class="method-args">()</span>
|
221
221
|
</a>
|
222
222
|
</div>
|
@@ -232,8 +232,8 @@ ex.
|
|
232
232
|
['dir1/a.txt', 'b.txt'].basenames() #=> ['a.txt', 'b.txt']
|
233
233
|
</pre>
|
234
234
|
<p><a class="source-toggle" href="#"
|
235
|
-
onclick="toggleCode('
|
236
|
-
<div class="method-source-code" id="
|
235
|
+
onclick="toggleCode('M000159-source');return false;">[Source]</a></p>
|
236
|
+
<div class="method-source-code" id="M000159-source">
|
237
237
|
<pre>
|
238
238
|
<span class="ruby-comment cmt"># File rook/helper/enumerable.rb, line 105</span>
|
239
239
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">basenames</span>
|
@@ -244,11 +244,11 @@ ex.
|
|
244
244
|
</div>
|
245
245
|
</div>
|
246
246
|
|
247
|
-
<div id="method-
|
248
|
-
<a name="
|
247
|
+
<div id="method-M000158" class="method-detail">
|
248
|
+
<a name="M000158"></a>
|
249
249
|
|
250
250
|
<div class="method-heading">
|
251
|
-
<a href="#
|
251
|
+
<a href="#M000158" class="method-signature">
|
252
252
|
<span class="method-name">delete_suffix</span><span class="method-args">(suffix=/\.\w+\z/)</span>
|
253
253
|
</a>
|
254
254
|
</div>
|
@@ -264,8 +264,8 @@ ex.
|
|
264
264
|
['a.txt', 'b.txt'].delete_suffix() #=> ["a", "b"]
|
265
265
|
</pre>
|
266
266
|
<p><a class="source-toggle" href="#"
|
267
|
-
onclick="toggleCode('
|
268
|
-
<div class="method-source-code" id="
|
267
|
+
onclick="toggleCode('M000158-source');return false;">[Source]</a></p>
|
268
|
+
<div class="method-source-code" id="M000158-source">
|
269
269
|
<pre>
|
270
270
|
<span class="ruby-comment cmt"># File rook/helper/enumerable.rb, line 91</span>
|
271
271
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">delete_suffix</span>(<span class="ruby-identifier">suffix</span>=<span class="ruby-regexp re">/\.\w+\z/</span>)
|
@@ -279,11 +279,11 @@ ex.
|
|
279
279
|
</div>
|
280
280
|
</div>
|
281
281
|
|
282
|
-
<div id="method-
|
283
|
-
<a name="
|
282
|
+
<div id="method-M000160" class="method-detail">
|
283
|
+
<a name="M000160"></a>
|
284
284
|
|
285
285
|
<div class="method-heading">
|
286
|
-
<a href="#
|
286
|
+
<a href="#M000160" class="method-signature">
|
287
287
|
<span class="method-name">dirnames</span><span class="method-args">()</span>
|
288
288
|
</a>
|
289
289
|
</div>
|
@@ -299,8 +299,8 @@ ex.
|
|
299
299
|
['dir1/a.txt', 'b.txt'].dirnames() #=> ['dir1', '.']
|
300
300
|
</pre>
|
301
301
|
<p><a class="source-toggle" href="#"
|
302
|
-
onclick="toggleCode('
|
303
|
-
<div class="method-source-code" id="
|
302
|
+
onclick="toggleCode('M000160-source');return false;">[Source]</a></p>
|
303
|
+
<div class="method-source-code" id="M000160-source">
|
304
304
|
<pre>
|
305
305
|
<span class="ruby-comment cmt"># File rook/helper/enumerable.rb, line 116</span>
|
306
306
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">dirnames</span>
|
@@ -311,11 +311,11 @@ ex.
|
|
311
311
|
</div>
|
312
312
|
</div>
|
313
313
|
|
314
|
-
<div id="method-
|
315
|
-
<a name="
|
314
|
+
<div id="method-M000157" class="method-detail">
|
315
|
+
<a name="M000157"></a>
|
316
316
|
|
317
317
|
<div class="method-heading">
|
318
|
-
<a href="#
|
318
|
+
<a href="#M000157" class="method-signature">
|
319
319
|
<span class="method-name">each_gsub</span><span class="method-args">(pattern, replace, &block)</span>
|
320
320
|
</a>
|
321
321
|
</div>
|
@@ -331,8 +331,8 @@ ex.
|
|
331
331
|
['a.txt', 'b.txt'].each_gsub(/\.txt$/, '.html') #=> ["a.html", "b.html"]
|
332
332
|
</pre>
|
333
333
|
<p><a class="source-toggle" href="#"
|
334
|
-
onclick="toggleCode('
|
335
|
-
<div class="method-source-code" id="
|
334
|
+
onclick="toggleCode('M000157-source');return false;">[Source]</a></p>
|
335
|
+
<div class="method-source-code" id="M000157-source">
|
336
336
|
<pre>
|
337
337
|
<span class="ruby-comment cmt"># File rook/helper/enumerable.rb, line 76</span>
|
338
338
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">each_gsub</span>(<span class="ruby-identifier">pattern</span>, <span class="ruby-identifier">replace</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
@@ -347,11 +347,11 @@ ex.
|
|
347
347
|
</div>
|
348
348
|
</div>
|
349
349
|
|
350
|
-
<div id="method-
|
351
|
-
<a name="
|
350
|
+
<div id="method-M000156" class="method-detail">
|
351
|
+
<a name="M000156"></a>
|
352
352
|
|
353
353
|
<div class="method-heading">
|
354
|
-
<a href="#
|
354
|
+
<a href="#M000156" class="method-signature">
|
355
355
|
<span class="method-name">each_sub</span><span class="method-args">(pattern, replace, &block)</span>
|
356
356
|
</a>
|
357
357
|
</div>
|
@@ -367,8 +367,8 @@ ex.
|
|
367
367
|
['a.txt', 'b.txt'].each_sub(/\.txt$/, '.html') #=> ["a.html", "b.html"]
|
368
368
|
</pre>
|
369
369
|
<p><a class="source-toggle" href="#"
|
370
|
-
onclick="toggleCode('
|
371
|
-
<div class="method-source-code" id="
|
370
|
+
onclick="toggleCode('M000156-source');return false;">[Source]</a></p>
|
371
|
+
<div class="method-source-code" id="M000156-source">
|
372
372
|
<pre>
|
373
373
|
<span class="ruby-comment cmt"># File rook/helper/enumerable.rb, line 61</span>
|
374
374
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">each_sub</span>(<span class="ruby-identifier">pattern</span>, <span class="ruby-identifier">replace</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
@@ -383,11 +383,11 @@ ex.
|
|
383
383
|
</div>
|
384
384
|
</div>
|
385
385
|
|
386
|
-
<div id="method-
|
387
|
-
<a name="
|
386
|
+
<div id="method-M000155" class="method-detail">
|
387
|
+
<a name="M000155"></a>
|
388
388
|
|
389
389
|
<div class="method-heading">
|
390
|
-
<a href="#
|
390
|
+
<a href="#M000155" class="method-signature">
|
391
391
|
<span class="method-name">sandwich</span><span class="method-args">(prefix, suffix)</span>
|
392
392
|
</a>
|
393
393
|
</div>
|
@@ -403,8 +403,8 @@ ex.
|
|
403
403
|
['a','b','c'].sandwich('p/', '.s') #=> ["p/a.s", "p/b.s", "p/c.s"]
|
404
404
|
</pre>
|
405
405
|
<p><a class="source-toggle" href="#"
|
406
|
-
onclick="toggleCode('
|
407
|
-
<div class="method-source-code" id="
|
406
|
+
onclick="toggleCode('M000155-source');return false;">[Source]</a></p>
|
407
|
+
<div class="method-source-code" id="M000155-source">
|
408
408
|
<pre>
|
409
409
|
<span class="ruby-comment cmt"># File rook/helper/enumerable.rb, line 50</span>
|
410
410
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">sandwich</span>(<span class="ruby-identifier">prefix</span>, <span class="ruby-identifier">suffix</span>)
|