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
@@ -101,26 +101,32 @@ ex.
|
|
101
101
|
<h3 class="section-bar">Methods</h3>
|
102
102
|
|
103
103
|
<div class="name-list">
|
104
|
-
<a href="#
|
105
|
-
<a href="#
|
106
|
-
<a href="#
|
107
|
-
<a href="#
|
108
|
-
<a href="#
|
109
|
-
<a href="#
|
110
|
-
<a href="#
|
111
|
-
<a href="#
|
112
|
-
<a href="#
|
113
|
-
<a href="#
|
104
|
+
<a href="#M000118">_evaluate_expr</a>
|
105
|
+
<a href="#M000117">_expand_value</a>
|
106
|
+
<a href="#M000126">add_material</a>
|
107
|
+
<a href="#M000125">add_parameter</a>
|
108
|
+
<a href="#M000123">add_preparation</a>
|
109
|
+
<a href="#M000124">add_property</a>
|
110
|
+
<a href="#M000127">add_recipe</a>
|
111
|
+
<a href="#M000132">cook</a>
|
112
|
+
<a href="#M000128">find_generic_recipe</a>
|
113
|
+
<a href="#M000130">find_recipe</a>
|
114
|
+
<a href="#M000129">find_specific_recipe</a>
|
115
|
+
<a href="#M000111">get_parameter</a>
|
114
116
|
<a href="#M000110">get_property</a>
|
115
|
-
<a href="#
|
117
|
+
<a href="#M000114">get_value</a>
|
118
|
+
<a href="#M000109">has_parameter?</a>
|
116
119
|
<a href="#M000108">has_property?</a>
|
117
|
-
<a href="#
|
118
|
-
<a href="#
|
119
|
-
<a href="#
|
120
|
-
<a href="#
|
121
|
-
<a href="#M000115">load_script!</a>
|
120
|
+
<a href="#M000120">load_book</a>
|
121
|
+
<a href="#M000119">load_books</a>
|
122
|
+
<a href="#M000121">load_script</a>
|
123
|
+
<a href="#M000122">load_script!</a>
|
122
124
|
<a href="#M000107">new</a>
|
123
|
-
<a href="#
|
125
|
+
<a href="#M000116">parameter_names</a>
|
126
|
+
<a href="#M000115">property_names</a>
|
127
|
+
<a href="#M000113">set_parameter</a>
|
128
|
+
<a href="#M000112">set_property</a>
|
129
|
+
<a href="#M000131">start_cooking</a>
|
124
130
|
</div>
|
125
131
|
</div>
|
126
132
|
|
@@ -154,22 +160,22 @@ ex.
|
|
154
160
|
<td class="context-item-desc"></td>
|
155
161
|
</tr>
|
156
162
|
<tr class="top-aligned-row context-row">
|
157
|
-
<td class="context-item-name">
|
163
|
+
<td class="context-item-name">parameters</td>
|
158
164
|
<td class="context-item-value"> [R] </td>
|
159
165
|
<td class="context-item-desc"></td>
|
160
166
|
</tr>
|
161
167
|
<tr class="top-aligned-row context-row">
|
162
|
-
<td class="context-item-name">
|
168
|
+
<td class="context-item-name">preparations</td>
|
163
169
|
<td class="context-item-value"> [R] </td>
|
164
170
|
<td class="context-item-desc"></td>
|
165
171
|
</tr>
|
166
172
|
<tr class="top-aligned-row context-row">
|
167
|
-
<td class="context-item-name">
|
173
|
+
<td class="context-item-name">properties</td>
|
168
174
|
<td class="context-item-value"> [R] </td>
|
169
175
|
<td class="context-item-desc"></td>
|
170
176
|
</tr>
|
171
177
|
<tr class="top-aligned-row context-row">
|
172
|
-
<td class="context-item-name">
|
178
|
+
<td class="context-item-name">recipes</td>
|
173
179
|
<td class="context-item-value"> [R] </td>
|
174
180
|
<td class="context-item-desc"></td>
|
175
181
|
</tr>
|
@@ -197,21 +203,21 @@ ex.
|
|
197
203
|
onclick="toggleCode('M000107-source');return false;">[Source]</a></p>
|
198
204
|
<div class="method-source-code" id="M000107-source">
|
199
205
|
<pre>
|
200
|
-
<span class="ruby-comment cmt"># File rook/kitchen.rb, line
|
206
|
+
<span class="ruby-comment cmt"># File rook/kitchen.rb, line 300</span>
|
201
207
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">properties</span>={}, <span class="ruby-identifier">options</span>={})
|
202
|
-
<span class="ruby-ivar">@
|
208
|
+
<span class="ruby-ivar">@value_table</span> = <span class="ruby-constant">ValueTable</span>.<span class="ruby-identifier">new</span>
|
203
209
|
<span class="ruby-ivar">@properties</span> = []
|
204
|
-
<span class="ruby-ivar">@
|
210
|
+
<span class="ruby-ivar">@parameters</span> = []
|
205
211
|
<span class="ruby-identifier">properties</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">name</span>, <span class="ruby-identifier">value</span><span class="ruby-operator">|</span>
|
206
212
|
<span class="ruby-identifier">add_property</span>({<span class="ruby-value str">'name'</span>=<span class="ruby-operator">></span><span class="ruby-identifier">name</span>.<span class="ruby-identifier">to_s</span>, <span class="ruby-value str">'value'</span>=<span class="ruby-operator">></span><span class="ruby-identifier">value</span>})
|
207
213
|
<span class="ruby-keyword kw">end</span>
|
208
214
|
<span class="ruby-ivar">@recipes</span> = []
|
209
215
|
<span class="ruby-ivar">@recipe_table</span> = {}
|
210
216
|
<span class="ruby-ivar">@materials</span> = []
|
211
|
-
<span class="ruby-ivar">@
|
217
|
+
<span class="ruby-ivar">@preparations</span> = []
|
212
218
|
<span class="ruby-ivar">@forced</span> = <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:forced</span>]
|
213
219
|
<span class="ruby-comment cmt">#@verbose = options[:verbose]</span>
|
214
|
-
<span class="ruby-
|
220
|
+
<span class="ruby-ivar">@noexec</span> = <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:noexec</span>]
|
215
221
|
<span class="ruby-keyword kw">end</span>
|
216
222
|
</pre>
|
217
223
|
</div>
|
@@ -220,200 +226,233 @@ ex.
|
|
220
226
|
|
221
227
|
<h3 class="section-bar">Public Instance methods</h3>
|
222
228
|
|
223
|
-
<div id="method-
|
224
|
-
<a name="
|
229
|
+
<div id="method-M000118" class="method-detail">
|
230
|
+
<a name="M000118"></a>
|
225
231
|
|
226
232
|
<div class="method-heading">
|
227
|
-
<a href="#
|
228
|
-
<span class="method-name">
|
233
|
+
<a href="#M000118" class="method-signature">
|
234
|
+
<span class="method-name">_evaluate_expr</span><span class="method-args">(expr, linenum=nil)</span>
|
229
235
|
</a>
|
230
236
|
</div>
|
231
237
|
|
232
238
|
<div class="method-description">
|
233
239
|
<p><a class="source-toggle" href="#"
|
234
|
-
onclick="toggleCode('
|
235
|
-
<div class="method-source-code" id="
|
240
|
+
onclick="toggleCode('M000118-source');return false;">[Source]</a></p>
|
241
|
+
<div class="method-source-code" id="M000118-source">
|
236
242
|
<pre>
|
237
|
-
<span class="ruby-comment cmt"># File rook/kitchen.rb, line
|
238
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">
|
239
|
-
<span class="ruby-
|
240
|
-
<span class="ruby-ivar">@materials</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">mat_str</span>
|
243
|
+
<span class="ruby-comment cmt"># File rook/kitchen.rb, line 360</span>
|
244
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">_evaluate_expr</span>(<span class="ruby-identifier">expr</span>, <span class="ruby-identifier">linenum</span>=<span class="ruby-keyword kw">nil</span>)
|
245
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@value_table</span>.<span class="ruby-identifier">evaluate_expr</span>(<span class="ruby-identifier">expr</span>, <span class="ruby-ivar">@filename</span>, <span class="ruby-identifier">linenum</span>)
|
241
246
|
<span class="ruby-keyword kw">end</span>
|
242
247
|
</pre>
|
243
248
|
</div>
|
244
249
|
</div>
|
245
250
|
</div>
|
246
251
|
|
247
|
-
<div id="method-
|
248
|
-
<a name="
|
252
|
+
<div id="method-M000117" class="method-detail">
|
253
|
+
<a name="M000117"></a>
|
249
254
|
|
250
255
|
<div class="method-heading">
|
251
|
-
<a href="#
|
252
|
-
<span class="method-name">
|
256
|
+
<a href="#M000117" class="method-signature">
|
257
|
+
<span class="method-name">_expand_value</span><span class="method-args">(value, linenum=nil)</span>
|
253
258
|
</a>
|
254
259
|
</div>
|
255
260
|
|
256
261
|
<div class="method-description">
|
257
262
|
<p><a class="source-toggle" href="#"
|
258
|
-
onclick="toggleCode('
|
259
|
-
<div class="method-source-code" id="
|
263
|
+
onclick="toggleCode('M000117-source');return false;">[Source]</a></p>
|
264
|
+
<div class="method-source-code" id="M000117-source">
|
260
265
|
<pre>
|
261
|
-
<span class="ruby-comment cmt"># File rook/kitchen.rb, line
|
262
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">
|
263
|
-
<span class="ruby-
|
264
|
-
<span class="ruby-constant">Util</span>.<span class="ruby-identifier">evaluate</span>(<span class="ruby-identifier">code_str</span>, <span class="ruby-identifier">bookname</span>, <span class="ruby-identifier">linenum</span>) <span class="ruby-comment cmt"># or instance_eval?</span>
|
266
|
+
<span class="ruby-comment cmt"># File rook/kitchen.rb, line 356</span>
|
267
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">_expand_value</span>(<span class="ruby-identifier">value</span>, <span class="ruby-identifier">linenum</span>=<span class="ruby-keyword kw">nil</span>)
|
268
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@value_table</span>.<span class="ruby-identifier">expand_value</span>(<span class="ruby-identifier">value</span>, <span class="ruby-ivar">@filename</span>, <span class="ruby-identifier">linenum</span>)
|
265
269
|
<span class="ruby-keyword kw">end</span>
|
266
270
|
</pre>
|
267
271
|
</div>
|
268
272
|
</div>
|
269
273
|
</div>
|
270
274
|
|
271
|
-
<div id="method-
|
272
|
-
<a name="
|
275
|
+
<div id="method-M000126" class="method-detail">
|
276
|
+
<a name="M000126"></a>
|
273
277
|
|
274
278
|
<div class="method-heading">
|
275
|
-
<a href="#
|
276
|
-
<span class="method-name">
|
279
|
+
<a href="#M000126" class="method-signature">
|
280
|
+
<span class="method-name">add_material</span><span class="method-args">(material_str)</span>
|
277
281
|
</a>
|
278
282
|
</div>
|
279
283
|
|
280
284
|
<div class="method-description">
|
281
285
|
<p><a class="source-toggle" href="#"
|
282
|
-
onclick="toggleCode('
|
283
|
-
<div class="method-source-code" id="
|
286
|
+
onclick="toggleCode('M000126-source');return false;">[Source]</a></p>
|
287
|
+
<div class="method-source-code" id="M000126-source">
|
284
288
|
<pre>
|
285
|
-
<span class="ruby-comment cmt"># File rook/kitchen.rb, line
|
286
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">
|
287
|
-
<span class="ruby-identifier">
|
289
|
+
<span class="ruby-comment cmt"># File rook/kitchen.rb, line 460</span>
|
290
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_material</span>(<span class="ruby-identifier">material_str</span>)
|
291
|
+
<span class="ruby-identifier">mat_str</span> = <span class="ruby-identifier">_expand_value</span>(<span class="ruby-identifier">material_str</span>)
|
292
|
+
<span class="ruby-ivar">@materials</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">mat_str</span>
|
293
|
+
<span class="ruby-keyword kw">end</span>
|
294
|
+
</pre>
|
295
|
+
</div>
|
296
|
+
</div>
|
297
|
+
</div>
|
298
|
+
|
299
|
+
<div id="method-M000125" class="method-detail">
|
300
|
+
<a name="M000125"></a>
|
301
|
+
|
302
|
+
<div class="method-heading">
|
303
|
+
<a href="#M000125" class="method-signature">
|
304
|
+
<span class="method-name">add_parameter</span><span class="method-args">(hash, bookname='')</span>
|
305
|
+
</a>
|
306
|
+
</div>
|
307
|
+
|
308
|
+
<div class="method-description">
|
309
|
+
<p><a class="source-toggle" href="#"
|
310
|
+
onclick="toggleCode('M000125-source');return false;">[Source]</a></p>
|
311
|
+
<div class="method-source-code" id="M000125-source">
|
312
|
+
<pre>
|
313
|
+
<span class="ruby-comment cmt"># File rook/kitchen.rb, line 439</span>
|
314
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_parameter</span>(<span class="ruby-identifier">hash</span>, <span class="ruby-identifier">bookname</span>=<span class="ruby-value str">''</span>)
|
288
315
|
<span class="ruby-identifier">name</span> = <span class="ruby-identifier">hash</span>[<span class="ruby-value str">'name'</span>]
|
289
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-
|
290
|
-
<span class="ruby-identifier">
|
316
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">has_parameter?</span>(<span class="ruby-identifier">name</span>)
|
317
|
+
<span class="ruby-ivar">@parameters</span>.<span class="ruby-identifier">delete_if</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">h</span><span class="ruby-operator">|</span> <span class="ruby-identifier">h</span>[<span class="ruby-value str">'name'</span>] <span class="ruby-operator">==</span> <span class="ruby-identifier">name</span> }
|
318
|
+
<span class="ruby-keyword kw">end</span>
|
319
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">hash</span>.<span class="ruby-identifier">key?</span>(<span class="ruby-value str">'value'</span>)
|
320
|
+
<span class="ruby-identifier">value</span> = <span class="ruby-identifier">_expand_value</span>(<span class="ruby-identifier">hash</span>[<span class="ruby-value str">'value'</span>])
|
321
|
+
<span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">hash</span>.<span class="ruby-identifier">key?</span>(<span class="ruby-value str">'value*'</span>)
|
322
|
+
<span class="ruby-identifier">code</span> = <span class="ruby-identifier">hash</span>[<span class="ruby-value str">'value*'</span>]
|
323
|
+
<span class="ruby-identifier">linenum</span> = <span class="ruby-identifier">hash</span>[<span class="ruby-value str">'linenum'</span>]
|
324
|
+
<span class="ruby-identifier">code</span> = <span class="ruby-identifier">_expand_value</span>(<span class="ruby-identifier">code</span>)
|
325
|
+
<span class="ruby-identifier">value</span> = <span class="ruby-identifier">_evaluate_expr</span>(<span class="ruby-identifier">code</span>, <span class="ruby-identifier">linenum</span>)
|
291
326
|
<span class="ruby-keyword kw">else</span>
|
292
|
-
<span class="ruby-
|
293
|
-
<span class="ruby-identifier">value</span> = <span class="ruby-ivar">@parameters</span>.<span class="ruby-identifier">evaluate_value</span>(<span class="ruby-identifier">hash</span>[<span class="ruby-value str">'value'</span>])
|
294
|
-
<span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">hash</span>.<span class="ruby-identifier">key?</span>(<span class="ruby-value str">'expr'</span>) <span class="ruby-operator">||</span> <span class="ruby-identifier">hash</span>.<span class="ruby-identifier">key?</span>(<span class="ruby-value str">'value*'</span>)
|
295
|
-
<span class="ruby-identifier">expr</span> = <span class="ruby-identifier">hash</span>.<span class="ruby-identifier">key?</span>(<span class="ruby-value str">'expr'</span>) <span class="ruby-operator">?</span> <span class="ruby-identifier">hash</span>[<span class="ruby-value str">'expr'</span>] <span class="ruby-operator">:</span> <span class="ruby-identifier">hash</span>[<span class="ruby-value str">'value*'</span>]
|
296
|
-
<span class="ruby-identifier">expr</span> = <span class="ruby-ivar">@parameters</span>.<span class="ruby-identifier">evaluate_value</span>(<span class="ruby-identifier">expr</span>)
|
297
|
-
<span class="ruby-identifier">value</span> = <span class="ruby-ivar">@valuemap</span>.<span class="ruby-identifier">evaluate_expr</span>(<span class="ruby-identifier">expr</span>, <span class="ruby-identifier">bookname</span>, <span class="ruby-identifier">hash</span>[<span class="ruby-value str">'linenum'</span>])
|
298
|
-
<span class="ruby-keyword kw">else</span>
|
299
|
-
<span class="ruby-identifier">raise</span> <span class="ruby-constant">RookError</span>.<span class="ruby-identifier">new</span>(<span class="ruby-node">"property '#{name}': no value."</span>)
|
300
|
-
<span class="ruby-keyword kw">end</span>
|
301
|
-
<span class="ruby-ivar">@parameters</span>.<span class="ruby-identifier">set_property</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">value</span>)
|
302
|
-
<span class="ruby-identifier">hash</span>[<span class="ruby-value str">'value'</span>] = <span class="ruby-identifier">value</span>
|
303
|
-
<span class="ruby-ivar">@properties</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">hash</span>
|
327
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-constant">RookError</span>.<span class="ruby-identifier">new</span>(<span class="ruby-node">"parameter '#{name}': no value."</span>)
|
304
328
|
<span class="ruby-keyword kw">end</span>
|
305
|
-
<span class="ruby-
|
329
|
+
<span class="ruby-identifier">set_parameter</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">value</span>)
|
330
|
+
<span class="ruby-identifier">hash</span>[<span class="ruby-value str">'value'</span>] = <span class="ruby-identifier">value</span>
|
331
|
+
<span class="ruby-ivar">@parameters</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">hash</span>
|
306
332
|
<span class="ruby-keyword kw">end</span>
|
307
333
|
</pre>
|
308
334
|
</div>
|
309
335
|
</div>
|
310
336
|
</div>
|
311
337
|
|
312
|
-
<div id="method-
|
313
|
-
<a name="
|
338
|
+
<div id="method-M000123" class="method-detail">
|
339
|
+
<a name="M000123"></a>
|
314
340
|
|
315
341
|
<div class="method-heading">
|
316
|
-
<a href="#
|
317
|
-
<span class="method-name">
|
342
|
+
<a href="#M000123" class="method-signature">
|
343
|
+
<span class="method-name">add_preparation</span><span class="method-args">(code_str, bookname='', linenum=1)</span>
|
318
344
|
</a>
|
319
345
|
</div>
|
320
346
|
|
321
347
|
<div class="method-description">
|
322
348
|
<p><a class="source-toggle" href="#"
|
323
|
-
onclick="toggleCode('
|
324
|
-
<div class="method-source-code" id="
|
349
|
+
onclick="toggleCode('M000123-source');return false;">[Source]</a></p>
|
350
|
+
<div class="method-source-code" id="M000123-source">
|
325
351
|
<pre>
|
326
|
-
<span class="ruby-comment cmt"># File rook/kitchen.rb, line
|
327
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">
|
328
|
-
<span class="ruby-ivar">@
|
329
|
-
<span class="ruby-
|
330
|
-
<span class="ruby-ivar">@recipes</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">recipe</span>
|
352
|
+
<span class="ruby-comment cmt"># File rook/kitchen.rb, line 409</span>
|
353
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_preparation</span>(<span class="ruby-identifier">code_str</span>, <span class="ruby-identifier">bookname</span>=<span class="ruby-value str">''</span>, <span class="ruby-identifier">linenum</span>=<span class="ruby-value">1</span>)
|
354
|
+
<span class="ruby-ivar">@preparations</span> <span class="ruby-operator"><<</span> [<span class="ruby-identifier">code_str</span>, <span class="ruby-identifier">bookname</span>, <span class="ruby-identifier">linenum</span>]
|
355
|
+
<span class="ruby-constant">Util</span>.<span class="ruby-identifier">evaluate</span>(<span class="ruby-identifier">code_str</span>, <span class="ruby-identifier">bookname</span>, <span class="ruby-identifier">linenum</span>) <span class="ruby-comment cmt"># or instance_eval?</span>
|
331
356
|
<span class="ruby-keyword kw">end</span>
|
332
357
|
</pre>
|
333
358
|
</div>
|
334
359
|
</div>
|
335
360
|
</div>
|
336
361
|
|
337
|
-
<div id="method-
|
338
|
-
<a name="
|
362
|
+
<div id="method-M000124" class="method-detail">
|
363
|
+
<a name="M000124"></a>
|
339
364
|
|
340
365
|
<div class="method-heading">
|
341
|
-
<a href="#
|
342
|
-
<span class="method-name">
|
366
|
+
<a href="#M000124" class="method-signature">
|
367
|
+
<span class="method-name">add_property</span><span class="method-args">(hash, bookname='')</span>
|
343
368
|
</a>
|
344
369
|
</div>
|
345
370
|
|
346
371
|
<div class="method-description">
|
347
372
|
<p><a class="source-toggle" href="#"
|
348
|
-
onclick="toggleCode('
|
349
|
-
<div class="method-source-code" id="
|
373
|
+
onclick="toggleCode('M000124-source');return false;">[Source]</a></p>
|
374
|
+
<div class="method-source-code" id="M000124-source">
|
350
375
|
<pre>
|
351
|
-
<span class="ruby-comment cmt"># File rook/kitchen.rb, line
|
352
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">
|
353
|
-
<span class="ruby-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
<span class="ruby-identifier">
|
360
|
-
<span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">hash</span>.<span class="ruby-identifier">key?</span>(<span class="ruby-identifier">key</span>)
|
361
|
-
<span class="ruby-identifier">
|
362
|
-
<span class="ruby-identifier">
|
376
|
+
<span class="ruby-comment cmt"># File rook/kitchen.rb, line 415</span>
|
377
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_property</span>(<span class="ruby-identifier">hash</span>, <span class="ruby-identifier">bookname</span>=<span class="ruby-value str">''</span>)
|
378
|
+
<span class="ruby-identifier">hash</span>[<span class="ruby-value str">'access'</span>] <span class="ruby-operator">||=</span> <span class="ruby-value str">'public'</span>
|
379
|
+
<span class="ruby-identifier">name</span> = <span class="ruby-identifier">hash</span>[<span class="ruby-value str">'name'</span>]
|
380
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">has_property?</span>(<span class="ruby-identifier">name</span>)
|
381
|
+
<span class="ruby-identifier">value</span> = <span class="ruby-identifier">get_property</span>(<span class="ruby-identifier">name</span>)
|
382
|
+
<span class="ruby-keyword kw">else</span>
|
383
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">hash</span>.<span class="ruby-identifier">key?</span>(<span class="ruby-value str">'value'</span>)
|
384
|
+
<span class="ruby-identifier">value</span> = <span class="ruby-identifier">_expand_value</span>(<span class="ruby-identifier">hash</span>[<span class="ruby-value str">'value'</span>])
|
385
|
+
<span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">hash</span>.<span class="ruby-identifier">key?</span>(<span class="ruby-value str">'expr'</span>) <span class="ruby-operator">||</span> <span class="ruby-identifier">hash</span>.<span class="ruby-identifier">key?</span>(<span class="ruby-value str">'value*'</span>)
|
386
|
+
<span class="ruby-identifier">code</span> = <span class="ruby-identifier">hash</span>.<span class="ruby-identifier">key?</span>(<span class="ruby-value str">'expr'</span>) <span class="ruby-operator">?</span> <span class="ruby-identifier">hash</span>[<span class="ruby-value str">'expr'</span>] <span class="ruby-operator">:</span> <span class="ruby-identifier">hash</span>[<span class="ruby-value str">'value*'</span>]
|
387
|
+
<span class="ruby-identifier">code</span> = <span class="ruby-identifier">_expand_value</span>(<span class="ruby-identifier">code</span>)
|
388
|
+
<span class="ruby-identifier">value</span> = <span class="ruby-identifier">_evaluate_expr</span>(<span class="ruby-identifier">code</span>, <span class="ruby-identifier">hash</span>[<span class="ruby-value str">'linenum'</span>])
|
389
|
+
<span class="ruby-keyword kw">else</span>
|
390
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-constant">RookError</span>.<span class="ruby-identifier">new</span>(<span class="ruby-node">"property '#{name}': no value."</span>)
|
363
391
|
<span class="ruby-keyword kw">end</span>
|
392
|
+
<span class="ruby-identifier">set_property</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">value</span>)
|
393
|
+
<span class="ruby-identifier">hash</span>[<span class="ruby-value str">'value'</span>] = <span class="ruby-identifier">value</span>
|
394
|
+
<span class="ruby-ivar">@properties</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">hash</span>
|
364
395
|
<span class="ruby-keyword kw">end</span>
|
365
|
-
<span class="ruby-
|
366
|
-
<span class="ruby-identifier">
|
396
|
+
<span class="ruby-comment cmt">#eval "$#{name} = value"</span>
|
397
|
+
<span class="ruby-identifier">instance_variable_set</span>(<span class="ruby-node">"@#{name}"</span>, <span class="ruby-identifier">value</span>)
|
367
398
|
<span class="ruby-keyword kw">end</span>
|
368
399
|
</pre>
|
369
400
|
</div>
|
370
401
|
</div>
|
371
402
|
</div>
|
372
403
|
|
373
|
-
<div id="method-
|
374
|
-
<a name="
|
404
|
+
<div id="method-M000127" class="method-detail">
|
405
|
+
<a name="M000127"></a>
|
375
406
|
|
376
407
|
<div class="method-heading">
|
377
|
-
<a href="#
|
378
|
-
<span class="method-name">
|
408
|
+
<a href="#M000127" class="method-signature">
|
409
|
+
<span class="method-name">add_recipe</span><span class="method-args">(recipe)</span>
|
379
410
|
</a>
|
380
411
|
</div>
|
381
412
|
|
382
413
|
<div class="method-description">
|
414
|
+
<p>
|
415
|
+
def add_recipe_hash(hash)
|
416
|
+
</p>
|
417
|
+
<pre>
|
418
|
+
%w[ingreds byprods coprods toppings].each do |key|
|
419
|
+
if hash.key?("#{key}*")
|
420
|
+
val = hash.delete("#{key}*")
|
421
|
+
assert val.is_a?(String), "val.class=#{val.class}"
|
422
|
+
val = _evaluate_expr(val)
|
423
|
+
val = [ val ] unless val.is_a?(Array)
|
424
|
+
hash[key] = val
|
425
|
+
elsif hash.key?(key)
|
426
|
+
val = _evaluate_expr(val)
|
427
|
+
hash[key] = val
|
428
|
+
end
|
429
|
+
end
|
430
|
+
r = Recipe.new(hash['product'])
|
431
|
+
add_recipe(r)
|
432
|
+
</pre>
|
433
|
+
<p>
|
434
|
+
end
|
435
|
+
</p>
|
383
436
|
<p><a class="source-toggle" href="#"
|
384
|
-
onclick="toggleCode('
|
385
|
-
<div class="method-source-code" id="
|
437
|
+
onclick="toggleCode('M000127-source');return false;">[Source]</a></p>
|
438
|
+
<div class="method-source-code" id="M000127-source">
|
386
439
|
<pre>
|
387
|
-
<span class="ruby-comment cmt"># File rook/kitchen.rb, line
|
388
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">
|
389
|
-
<span class="ruby-identifier">
|
390
|
-
<span class="ruby-
|
391
|
-
|
392
|
-
<span class="ruby-keyword kw">end</span>
|
393
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">hash</span>.<span class="ruby-identifier">key?</span>(<span class="ruby-value str">'value'</span>)
|
394
|
-
<span class="ruby-identifier">value</span> = <span class="ruby-ivar">@parameters</span>.<span class="ruby-identifier">evaluate_value</span>(<span class="ruby-identifier">hash</span>[<span class="ruby-value str">'value'</span>])
|
395
|
-
<span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">hash</span>.<span class="ruby-identifier">key?</span>(<span class="ruby-value str">'expr'</span>) <span class="ruby-operator">||</span> <span class="ruby-identifier">hash</span>.<span class="ruby-identifier">key?</span>(<span class="ruby-value str">'value*'</span>)
|
396
|
-
<span class="ruby-identifier">expr</span> = <span class="ruby-identifier">hash</span>.<span class="ruby-identifier">key?</span>(<span class="ruby-value str">'expr'</span>) <span class="ruby-operator">?</span> <span class="ruby-identifier">hash</span>[<span class="ruby-value str">'expr'</span>] <span class="ruby-operator">:</span> <span class="ruby-identifier">hash</span>[<span class="ruby-value str">'value*'</span>]
|
397
|
-
<span class="ruby-identifier">linenum</span> = <span class="ruby-identifier">hash</span>[<span class="ruby-value str">'linenum'</span>] <span class="ruby-operator">||</span> <span class="ruby-value">1</span>
|
398
|
-
<span class="ruby-identifier">expr</span> = <span class="ruby-ivar">@parameters</span>.<span class="ruby-identifier">evaluate_value</span>(<span class="ruby-identifier">expr</span>)
|
399
|
-
<span class="ruby-identifier">value</span> = <span class="ruby-ivar">@parameters</span>.<span class="ruby-identifier">evaluate_expr</span>(<span class="ruby-identifier">expr</span>, <span class="ruby-identifier">bookname</span>, <span class="ruby-identifier">linenum</span>)
|
400
|
-
<span class="ruby-keyword kw">else</span>
|
401
|
-
<span class="ruby-identifier">raise</span> <span class="ruby-constant">RookError</span>.<span class="ruby-identifier">new</span>(<span class="ruby-node">"variable '#{name}': no value."</span>)
|
402
|
-
<span class="ruby-keyword kw">end</span>
|
403
|
-
<span class="ruby-ivar">@parameters</span>.<span class="ruby-identifier">set_variable</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">value</span>)
|
404
|
-
<span class="ruby-identifier">hash</span>[<span class="ruby-value str">'value'</span>] = <span class="ruby-identifier">value</span>
|
405
|
-
<span class="ruby-ivar">@variables</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">hash</span>
|
440
|
+
<span class="ruby-comment cmt"># File rook/kitchen.rb, line 484</span>
|
441
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_recipe</span>(<span class="ruby-identifier">recipe</span>)
|
442
|
+
<span class="ruby-ivar">@recipes</span>.<span class="ruby-identifier">delete_if</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">r</span><span class="ruby-operator">|</span> <span class="ruby-identifier">r</span>.<span class="ruby-identifier">product</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">recipe</span>.<span class="ruby-identifier">product</span> } <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@recipe_table</span>[<span class="ruby-identifier">recipe</span>.<span class="ruby-identifier">product</span>]
|
443
|
+
<span class="ruby-ivar">@recipe_table</span>[<span class="ruby-identifier">recipe</span>.<span class="ruby-identifier">product</span>] = <span class="ruby-identifier">recipe</span>
|
444
|
+
<span class="ruby-ivar">@recipes</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">recipe</span>
|
406
445
|
<span class="ruby-keyword kw">end</span>
|
407
446
|
</pre>
|
408
447
|
</div>
|
409
448
|
</div>
|
410
449
|
</div>
|
411
450
|
|
412
|
-
<div id="method-
|
413
|
-
<a name="
|
451
|
+
<div id="method-M000132" class="method-detail">
|
452
|
+
<a name="M000132"></a>
|
414
453
|
|
415
454
|
<div class="method-heading">
|
416
|
-
<a href="#
|
455
|
+
<a href="#M000132" class="method-signature">
|
417
456
|
<span class="method-name">cook</span><span class="method-args">(product, cooking, level=0, verbose=nil, parent_fingerprint=false)</span>
|
418
457
|
</a>
|
419
458
|
</div>
|
@@ -426,10 +465,10 @@ cook product
|
|
426
465
|
return true when product recipe is invoked, else return false.
|
427
466
|
</p>
|
428
467
|
<p><a class="source-toggle" href="#"
|
429
|
-
onclick="toggleCode('
|
430
|
-
<div class="method-source-code" id="
|
468
|
+
onclick="toggleCode('M000132-source');return false;">[Source]</a></p>
|
469
|
+
<div class="method-source-code" id="M000132-source">
|
431
470
|
<pre>
|
432
|
-
<span class="ruby-comment cmt"># File rook/kitchen.rb, line
|
471
|
+
<span class="ruby-comment cmt"># File rook/kitchen.rb, line 522</span>
|
433
472
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cook</span>(<span class="ruby-identifier">product</span>, <span class="ruby-identifier">cooking</span>, <span class="ruby-identifier">level</span>=<span class="ruby-value">0</span>, <span class="ruby-identifier">verbose</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">parent_fingerprint</span>=<span class="ruby-keyword kw">false</span>)
|
434
473
|
<span class="ruby-comment cmt">## check</span>
|
435
474
|
<span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@materials</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">product</span>)
|
@@ -463,7 +502,7 @@ return true when product recipe is invoked, else return false.
|
|
463
502
|
|
464
503
|
<span class="ruby-comment cmt">## ingredients</span>
|
465
504
|
<span class="ruby-identifier">ingreds</span> = <span class="ruby-identifier">recipe</span>.<span class="ruby-identifier">ingreds</span> <span class="ruby-value">? </span><span class="ruby-identifier">recipe</span>.<span class="ruby-identifier">ingreds</span>.<span class="ruby-identifier">dup</span> <span class="ruby-operator">:</span> []
|
466
|
-
<span class="ruby-identifier">ingreds</span>.<span class="ruby-identifier">concat</span>(<span class="ruby-identifier">recipe</span>.<span class="ruby-identifier">
|
505
|
+
<span class="ruby-identifier">ingreds</span>.<span class="ruby-identifier">concat</span>(<span class="ruby-identifier">recipe</span>.<span class="ruby-identifier">toppings</span>.<span class="ruby-identifier">find_all</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span> <span class="ruby-identifier">test</span>(<span class="ruby-value">?e</span>, <span class="ruby-identifier">f</span>) }) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">recipe</span>.<span class="ruby-identifier">toppings</span>
|
467
506
|
<span class="ruby-comment cmt"># ingreds.each do |ingred|</span>
|
468
507
|
<span class="ruby-comment cmt"># flag = cook(ingred, cooking, level+1, recipe.verbose?, recipe.fingerprint)</span>
|
469
508
|
<span class="ruby-comment cmt"># flag_exec = true if flag</span>
|
@@ -493,7 +532,7 @@ return true when product recipe is invoked, else return false.
|
|
493
532
|
|
494
533
|
<span class="ruby-comment cmt">## invoke ingredients' recipe</span>
|
495
534
|
<span class="ruby-comment cmt">#ingreds = recipe.ingreds ? recipe.ingreds.dup : []</span>
|
496
|
-
<span class="ruby-comment cmt">#ingreds.concat(recipe.
|
535
|
+
<span class="ruby-comment cmt">#ingreds.concat(recipe.toppings.find_all { |f| test(?e, f) }) if recipe.toppings</span>
|
497
536
|
<span class="ruby-identifier">ingreds</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">ingred</span><span class="ruby-operator">|</span>
|
498
537
|
<span class="ruby-identifier">flag</span> = <span class="ruby-identifier">cook</span>(<span class="ruby-identifier">ingred</span>, <span class="ruby-identifier">cooking</span>, <span class="ruby-identifier">level</span><span class="ruby-operator">+</span><span class="ruby-value">1</span>, <span class="ruby-identifier">recipe</span>.<span class="ruby-identifier">verbose?</span>, <span class="ruby-identifier">recipe</span>.<span class="ruby-identifier">fingerprint</span>)
|
499
538
|
<span class="ruby-identifier">flag_exec</span> = <span class="ruby-keyword kw">true</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">flag</span>
|
@@ -512,7 +551,8 @@ return true when product recipe is invoked, else return false.
|
|
512
551
|
<span class="ruby-keyword kw">end</span>
|
513
552
|
<span class="ruby-identifier">report</span>(<span class="ruby-identifier">product</span>, <span class="ruby-identifier">level</span>, <span class="ruby-identifier">recipe</span>.<span class="ruby-identifier">verbose?</span>)
|
514
553
|
<span class="ruby-keyword kw">begin</span>
|
515
|
-
<span class="ruby-
|
554
|
+
<span class="ruby-comment cmt">#recipe.invoke(@value_table)</span>
|
555
|
+
<span class="ruby-identifier">recipe</span>.<span class="ruby-identifier">invoke</span>(<span class="ruby-keyword kw">self</span>)
|
516
556
|
<span class="ruby-keyword kw">rescue</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">ex</span>
|
517
557
|
<span class="ruby-identifier">prods</span> = [ <span class="ruby-identifier">recipe</span>.<span class="ruby-identifier">product</span> ]
|
518
558
|
<span class="ruby-identifier">prods</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">recipe</span>.<span class="ruby-identifier">coprods</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">recipe</span>.<span class="ruby-identifier">coprods</span>
|
@@ -526,7 +566,7 @@ return true when product recipe is invoked, else return false.
|
|
526
566
|
<span class="ruby-keyword kw">end</span>
|
527
567
|
|
528
568
|
<span class="ruby-comment cmt">## validate whether product is generated</span>
|
529
|
-
<span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">recipe</span>.<span class="ruby-identifier">symbolic?</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">test</span>(<span class="ruby-value">?e</span>, <span class="ruby-identifier">product</span>)
|
569
|
+
<span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">recipe</span>.<span class="ruby-identifier">symbolic?</span> <span class="ruby-operator">||</span> <span class="ruby-ivar">@noexec</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">test</span>(<span class="ruby-value">?e</span>, <span class="ruby-identifier">product</span>)
|
530
570
|
<span class="ruby-identifier">raise</span> <span class="ruby-constant">RookError</span>.<span class="ruby-identifier">new</span>(<span class="ruby-node">"product '#{Util.to_str(product)}': not generated"</span>)
|
531
571
|
<span class="ruby-keyword kw">end</span>
|
532
572
|
|
@@ -550,21 +590,21 @@ return true when product recipe is invoked, else return false.
|
|
550
590
|
</div>
|
551
591
|
</div>
|
552
592
|
|
553
|
-
<div id="method-
|
554
|
-
<a name="
|
593
|
+
<div id="method-M000128" class="method-detail">
|
594
|
+
<a name="M000128"></a>
|
555
595
|
|
556
596
|
<div class="method-heading">
|
557
|
-
<a href="#
|
597
|
+
<a href="#M000128" class="method-signature">
|
558
598
|
<span class="method-name">find_generic_recipe</span><span class="method-args">(product)</span>
|
559
599
|
</a>
|
560
600
|
</div>
|
561
601
|
|
562
602
|
<div class="method-description">
|
563
603
|
<p><a class="source-toggle" href="#"
|
564
|
-
onclick="toggleCode('
|
565
|
-
<div class="method-source-code" id="
|
604
|
+
onclick="toggleCode('M000128-source');return false;">[Source]</a></p>
|
605
|
+
<div class="method-source-code" id="M000128-source">
|
566
606
|
<pre>
|
567
|
-
<span class="ruby-comment cmt"># File rook/kitchen.rb, line
|
607
|
+
<span class="ruby-comment cmt"># File rook/kitchen.rb, line 491</span>
|
568
608
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">find_generic_recipe</span>(<span class="ruby-identifier">product</span>)
|
569
609
|
<span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@recipes</span>.<span class="ruby-identifier">find</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">r</span><span class="ruby-operator">|</span> <span class="ruby-identifier">r</span>.<span class="ruby-identifier">kind</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'generic'</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">r</span>.<span class="ruby-identifier">match?</span>(<span class="ruby-identifier">product</span>) }
|
570
610
|
<span class="ruby-keyword kw">end</span>
|
@@ -573,21 +613,21 @@ return true when product recipe is invoked, else return false.
|
|
573
613
|
</div>
|
574
614
|
</div>
|
575
615
|
|
576
|
-
<div id="method-
|
577
|
-
<a name="
|
616
|
+
<div id="method-M000130" class="method-detail">
|
617
|
+
<a name="M000130"></a>
|
578
618
|
|
579
619
|
<div class="method-heading">
|
580
|
-
<a href="#
|
620
|
+
<a href="#M000130" class="method-signature">
|
581
621
|
<span class="method-name">find_recipe</span><span class="method-args">(product)</span>
|
582
622
|
</a>
|
583
623
|
</div>
|
584
624
|
|
585
625
|
<div class="method-description">
|
586
626
|
<p><a class="source-toggle" href="#"
|
587
|
-
onclick="toggleCode('
|
588
|
-
<div class="method-source-code" id="
|
627
|
+
onclick="toggleCode('M000130-source');return false;">[Source]</a></p>
|
628
|
+
<div class="method-source-code" id="M000130-source">
|
589
629
|
<pre>
|
590
|
-
<span class="ruby-comment cmt"># File rook/kitchen.rb, line
|
630
|
+
<span class="ruby-comment cmt"># File rook/kitchen.rb, line 501</span>
|
591
631
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">find_recipe</span>(<span class="ruby-identifier">product</span>)
|
592
632
|
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">find_specific_recipe</span>(<span class="ruby-identifier">product</span>) <span class="ruby-operator">||</span> <span class="ruby-identifier">find_generic_recipe</span>(<span class="ruby-identifier">product</span>)
|
593
633
|
<span class="ruby-keyword kw">end</span>
|
@@ -596,21 +636,21 @@ return true when product recipe is invoked, else return false.
|
|
596
636
|
</div>
|
597
637
|
</div>
|
598
638
|
|
599
|
-
<div id="method-
|
600
|
-
<a name="
|
639
|
+
<div id="method-M000129" class="method-detail">
|
640
|
+
<a name="M000129"></a>
|
601
641
|
|
602
642
|
<div class="method-heading">
|
603
|
-
<a href="#
|
643
|
+
<a href="#M000129" class="method-signature">
|
604
644
|
<span class="method-name">find_specific_recipe</span><span class="method-args">(product)</span>
|
605
645
|
</a>
|
606
646
|
</div>
|
607
647
|
|
608
648
|
<div class="method-description">
|
609
649
|
<p><a class="source-toggle" href="#"
|
610
|
-
onclick="toggleCode('
|
611
|
-
<div class="method-source-code" id="
|
650
|
+
onclick="toggleCode('M000129-source');return false;">[Source]</a></p>
|
651
|
+
<div class="method-source-code" id="M000129-source">
|
612
652
|
<pre>
|
613
|
-
<span class="ruby-comment cmt"># File rook/kitchen.rb, line
|
653
|
+
<span class="ruby-comment cmt"># File rook/kitchen.rb, line 496</span>
|
614
654
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">find_specific_recipe</span>(<span class="ruby-identifier">product</span>)
|
615
655
|
<span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@recipes</span>.<span class="ruby-identifier">find</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">r</span><span class="ruby-operator">|</span> <span class="ruby-identifier">r</span>.<span class="ruby-identifier">kind</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'specific'</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">r</span>.<span class="ruby-identifier">match?</span>(<span class="ruby-identifier">product</span>) }
|
616
656
|
<span class="ruby-keyword kw">end</span>
|
@@ -619,6 +659,29 @@ return true when product recipe is invoked, else return false.
|
|
619
659
|
</div>
|
620
660
|
</div>
|
621
661
|
|
662
|
+
<div id="method-M000111" class="method-detail">
|
663
|
+
<a name="M000111"></a>
|
664
|
+
|
665
|
+
<div class="method-heading">
|
666
|
+
<a href="#M000111" class="method-signature">
|
667
|
+
<span class="method-name">get_parameter</span><span class="method-args">(name)</span>
|
668
|
+
</a>
|
669
|
+
</div>
|
670
|
+
|
671
|
+
<div class="method-description">
|
672
|
+
<p><a class="source-toggle" href="#"
|
673
|
+
onclick="toggleCode('M000111-source');return false;">[Source]</a></p>
|
674
|
+
<div class="method-source-code" id="M000111-source">
|
675
|
+
<pre>
|
676
|
+
<span class="ruby-comment cmt"># File rook/kitchen.rb, line 332</span>
|
677
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_parameter</span>(<span class="ruby-identifier">name</span>)
|
678
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@value_table</span>.<span class="ruby-identifier">get_parameter</span>(<span class="ruby-identifier">name</span>)
|
679
|
+
<span class="ruby-keyword kw">end</span>
|
680
|
+
</pre>
|
681
|
+
</div>
|
682
|
+
</div>
|
683
|
+
</div>
|
684
|
+
|
622
685
|
<div id="method-M000110" class="method-detail">
|
623
686
|
<a name="M000110"></a>
|
624
687
|
|
@@ -633,125 +696,125 @@ return true when product recipe is invoked, else return false.
|
|
633
696
|
onclick="toggleCode('M000110-source');return false;">[Source]</a></p>
|
634
697
|
<div class="method-source-code" id="M000110-source">
|
635
698
|
<pre>
|
636
|
-
<span class="ruby-comment cmt"># File rook/kitchen.rb, line
|
699
|
+
<span class="ruby-comment cmt"># File rook/kitchen.rb, line 328</span>
|
637
700
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_property</span>(<span class="ruby-identifier">name</span>)
|
638
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@
|
701
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@value_table</span>.<span class="ruby-identifier">get_property</span>(<span class="ruby-identifier">name</span>)
|
639
702
|
<span class="ruby-keyword kw">end</span>
|
640
703
|
</pre>
|
641
704
|
</div>
|
642
705
|
</div>
|
643
706
|
</div>
|
644
707
|
|
645
|
-
<div id="method-
|
646
|
-
<a name="
|
708
|
+
<div id="method-M000114" class="method-detail">
|
709
|
+
<a name="M000114"></a>
|
647
710
|
|
648
711
|
<div class="method-heading">
|
649
|
-
<a href="#
|
650
|
-
<span class="method-name">
|
712
|
+
<a href="#M000114" class="method-signature">
|
713
|
+
<span class="method-name">get_value</span><span class="method-args">(name)</span>
|
651
714
|
</a>
|
652
715
|
</div>
|
653
716
|
|
654
717
|
<div class="method-description">
|
655
718
|
<p><a class="source-toggle" href="#"
|
656
|
-
onclick="toggleCode('
|
657
|
-
<div class="method-source-code" id="
|
719
|
+
onclick="toggleCode('M000114-source');return false;">[Source]</a></p>
|
720
|
+
<div class="method-source-code" id="M000114-source">
|
658
721
|
<pre>
|
659
|
-
<span class="ruby-comment cmt"># File rook/kitchen.rb, line
|
660
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">
|
661
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@
|
722
|
+
<span class="ruby-comment cmt"># File rook/kitchen.rb, line 344</span>
|
723
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_value</span>(<span class="ruby-identifier">name</span>)
|
724
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@value_table</span>.<span class="ruby-identifier">get_value</span>(<span class="ruby-identifier">name</span>)
|
662
725
|
<span class="ruby-keyword kw">end</span>
|
663
726
|
</pre>
|
664
727
|
</div>
|
665
728
|
</div>
|
666
729
|
</div>
|
667
730
|
|
668
|
-
<div id="method-
|
669
|
-
<a name="
|
731
|
+
<div id="method-M000109" class="method-detail">
|
732
|
+
<a name="M000109"></a>
|
670
733
|
|
671
734
|
<div class="method-heading">
|
672
|
-
<a href="#
|
673
|
-
<span class="method-name">
|
735
|
+
<a href="#M000109" class="method-signature">
|
736
|
+
<span class="method-name">has_parameter?</span><span class="method-args">(name)</span>
|
674
737
|
</a>
|
675
738
|
</div>
|
676
739
|
|
677
740
|
<div class="method-description">
|
678
|
-
<p>
|
679
|
-
attr_reader :forced, :quiet, :noexec
|
680
|
-
</p>
|
681
741
|
<p><a class="source-toggle" href="#"
|
682
|
-
onclick="toggleCode('
|
683
|
-
<div class="method-source-code" id="
|
742
|
+
onclick="toggleCode('M000109-source');return false;">[Source]</a></p>
|
743
|
+
<div class="method-source-code" id="M000109-source">
|
684
744
|
<pre>
|
685
|
-
<span class="ruby-comment cmt"># File rook/kitchen.rb, line
|
686
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">
|
687
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@
|
745
|
+
<span class="ruby-comment cmt"># File rook/kitchen.rb, line 324</span>
|
746
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">has_parameter?</span>(<span class="ruby-identifier">name</span>)
|
747
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@value_table</span>.<span class="ruby-identifier">has_parameter?</span>(<span class="ruby-identifier">name</span>)
|
688
748
|
<span class="ruby-keyword kw">end</span>
|
689
749
|
</pre>
|
690
750
|
</div>
|
691
751
|
</div>
|
692
752
|
</div>
|
693
753
|
|
694
|
-
<div id="method-
|
695
|
-
<a name="
|
754
|
+
<div id="method-M000108" class="method-detail">
|
755
|
+
<a name="M000108"></a>
|
696
756
|
|
697
757
|
<div class="method-heading">
|
698
|
-
<a href="#
|
699
|
-
<span class="method-name">
|
758
|
+
<a href="#M000108" class="method-signature">
|
759
|
+
<span class="method-name">has_property?</span><span class="method-args">(name)</span>
|
700
760
|
</a>
|
701
761
|
</div>
|
702
762
|
|
703
763
|
<div class="method-description">
|
764
|
+
<p>
|
765
|
+
attr_reader :forced, :quiet, :noexec
|
766
|
+
</p>
|
704
767
|
<p><a class="source-toggle" href="#"
|
705
|
-
onclick="toggleCode('
|
706
|
-
<div class="method-source-code" id="
|
768
|
+
onclick="toggleCode('M000108-source');return false;">[Source]</a></p>
|
769
|
+
<div class="method-source-code" id="M000108-source">
|
707
770
|
<pre>
|
708
|
-
<span class="ruby-comment cmt"># File rook/kitchen.rb, line
|
709
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">
|
710
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@
|
771
|
+
<span class="ruby-comment cmt"># File rook/kitchen.rb, line 320</span>
|
772
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">has_property?</span>(<span class="ruby-identifier">name</span>)
|
773
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@value_table</span>.<span class="ruby-identifier">has_property?</span>(<span class="ruby-identifier">name</span>)
|
711
774
|
<span class="ruby-keyword kw">end</span>
|
712
775
|
</pre>
|
713
776
|
</div>
|
714
777
|
</div>
|
715
778
|
</div>
|
716
779
|
|
717
|
-
<div id="method-
|
718
|
-
<a name="
|
780
|
+
<div id="method-M000120" class="method-detail">
|
781
|
+
<a name="M000120"></a>
|
719
782
|
|
720
783
|
<div class="method-heading">
|
721
|
-
<a href="#
|
784
|
+
<a href="#M000120" class="method-signature">
|
722
785
|
<span class="method-name">load_book</span><span class="method-args">(cookbook)</span>
|
723
786
|
</a>
|
724
787
|
</div>
|
725
788
|
|
726
789
|
<div class="method-description">
|
727
790
|
<p><a class="source-toggle" href="#"
|
728
|
-
onclick="toggleCode('
|
729
|
-
<div class="method-source-code" id="
|
791
|
+
onclick="toggleCode('M000120-source');return false;">[Source]</a></p>
|
792
|
+
<div class="method-source-code" id="M000120-source">
|
730
793
|
<pre>
|
731
|
-
<span class="ruby-comment cmt"># File rook/kitchen.rb, line
|
794
|
+
<span class="ruby-comment cmt"># File rook/kitchen.rb, line 370</span>
|
732
795
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">load_book</span>(<span class="ruby-identifier">cookbook</span>)
|
733
796
|
<span class="ruby-identifier">b</span> = <span class="ruby-identifier">cookbook</span>
|
734
|
-
<span class="ruby-comment cmt">#
|
735
|
-
<span class="ruby-identifier">b</span>.<span class="ruby-identifier">
|
736
|
-
<span class="ruby-identifier">
|
737
|
-
<span class="ruby-keyword kw">end</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">b</span>.<span class="ruby-identifier">
|
797
|
+
<span class="ruby-comment cmt"># preparation</span>
|
798
|
+
<span class="ruby-identifier">b</span>.<span class="ruby-identifier">preparations</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">hash</span><span class="ruby-operator">|</span>
|
799
|
+
<span class="ruby-identifier">add_preparation</span>(<span class="ruby-identifier">hash</span>[<span class="ruby-value str">'code'</span>], <span class="ruby-identifier">b</span>.<span class="ruby-identifier">bookname</span>, <span class="ruby-identifier">hash</span>[<span class="ruby-value str">'linenum'</span>])
|
800
|
+
<span class="ruby-keyword kw">end</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">b</span>.<span class="ruby-identifier">preparation</span>
|
738
801
|
<span class="ruby-comment cmt"># properties</span>
|
739
802
|
<span class="ruby-identifier">b</span>.<span class="ruby-identifier">properties</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">hash</span><span class="ruby-operator">|</span>
|
740
803
|
<span class="ruby-identifier">hash</span>[<span class="ruby-value str">'bookname'</span>] = <span class="ruby-identifier">b</span>.<span class="ruby-identifier">bookname</span>
|
741
804
|
<span class="ruby-identifier">add_property</span>(<span class="ruby-identifier">hash</span>, <span class="ruby-identifier">b</span>.<span class="ruby-identifier">bookname</span>)
|
742
805
|
<span class="ruby-keyword kw">end</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">b</span>.<span class="ruby-identifier">properties</span>
|
743
|
-
<span class="ruby-comment cmt">#
|
744
|
-
<span class="ruby-identifier">b</span>.<span class="ruby-identifier">
|
806
|
+
<span class="ruby-comment cmt"># parameters</span>
|
807
|
+
<span class="ruby-identifier">b</span>.<span class="ruby-identifier">parameters</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">hash</span><span class="ruby-operator">|</span>
|
745
808
|
<span class="ruby-identifier">hash</span>[<span class="ruby-value str">'bookname'</span>] = <span class="ruby-identifier">b</span>.<span class="ruby-identifier">bookname</span>
|
746
|
-
<span class="ruby-identifier">
|
747
|
-
<span class="ruby-keyword kw">end</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">b</span>.<span class="ruby-identifier">
|
809
|
+
<span class="ruby-identifier">add_parameter</span>(<span class="ruby-identifier">hash</span>, <span class="ruby-identifier">b</span>.<span class="ruby-identifier">bookname</span>)
|
810
|
+
<span class="ruby-keyword kw">end</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">b</span>.<span class="ruby-identifier">parameters</span>
|
748
811
|
<span class="ruby-comment cmt"># materials</span>
|
749
812
|
<span class="ruby-identifier">b</span>.<span class="ruby-identifier">materials</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">nonprod</span><span class="ruby-operator">|</span>
|
750
|
-
<span class="ruby-identifier">
|
813
|
+
<span class="ruby-identifier">add_material</span>(<span class="ruby-identifier">nonprod</span>)
|
751
814
|
<span class="ruby-keyword kw">end</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">b</span>.<span class="ruby-identifier">materials</span>
|
752
815
|
<span class="ruby-comment cmt"># recipes</span>
|
753
816
|
<span class="ruby-identifier">b</span>.<span class="ruby-identifier">recipes</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">hash</span><span class="ruby-operator">|</span>
|
754
|
-
<span class="ruby-identifier">hash</span> = <span class="ruby-ivar">@
|
817
|
+
<span class="ruby-identifier">hash</span> = <span class="ruby-ivar">@value_table</span>.<span class="ruby-identifier">expand_value</span>(<span class="ruby-identifier">hash</span>)
|
755
818
|
<span class="ruby-identifier">hash</span>[<span class="ruby-value str">'bookname'</span>] = <span class="ruby-identifier">b</span>.<span class="ruby-identifier">bookname</span>
|
756
819
|
<span class="ruby-identifier">recipe</span> = <span class="ruby-constant">Recipe</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">hash</span>)
|
757
820
|
<span class="ruby-identifier">add_recipe</span>(<span class="ruby-identifier">recipe</span>)
|
@@ -762,21 +825,21 @@ attr_reader :forced, :quiet, :noexec
|
|
762
825
|
</div>
|
763
826
|
</div>
|
764
827
|
|
765
|
-
<div id="method-
|
766
|
-
<a name="
|
828
|
+
<div id="method-M000119" class="method-detail">
|
829
|
+
<a name="M000119"></a>
|
767
830
|
|
768
831
|
<div class="method-heading">
|
769
|
-
<a href="#
|
832
|
+
<a href="#M000119" class="method-signature">
|
770
833
|
<span class="method-name">load_books</span><span class="method-args">(cookbooks)</span>
|
771
834
|
</a>
|
772
835
|
</div>
|
773
836
|
|
774
837
|
<div class="method-description">
|
775
838
|
<p><a class="source-toggle" href="#"
|
776
|
-
onclick="toggleCode('
|
777
|
-
<div class="method-source-code" id="
|
839
|
+
onclick="toggleCode('M000119-source');return false;">[Source]</a></p>
|
840
|
+
<div class="method-source-code" id="M000119-source">
|
778
841
|
<pre>
|
779
|
-
<span class="ruby-comment cmt"># File rook/kitchen.rb, line
|
842
|
+
<span class="ruby-comment cmt"># File rook/kitchen.rb, line 365</span>
|
780
843
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">load_books</span>(<span class="ruby-identifier">cookbooks</span>)
|
781
844
|
<span class="ruby-identifier">cookboos</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">cookbook</span><span class="ruby-operator">|</span> <span class="ruby-identifier">load_book</span>(<span class="ruby-identifier">cookbook</span>) <span class="ruby-keyword kw">end</span>
|
782
845
|
<span class="ruby-keyword kw">end</span>
|
@@ -785,21 +848,21 @@ attr_reader :forced, :quiet, :noexec
|
|
785
848
|
</div>
|
786
849
|
</div>
|
787
850
|
|
788
|
-
<div id="method-
|
789
|
-
<a name="
|
851
|
+
<div id="method-M000121" class="method-detail">
|
852
|
+
<a name="M000121"></a>
|
790
853
|
|
791
854
|
<div class="method-heading">
|
792
|
-
<a href="#
|
855
|
+
<a href="#M000121" class="method-signature">
|
793
856
|
<span class="method-name">load_script</span><span class="method-args">(filename)</span>
|
794
857
|
</a>
|
795
858
|
</div>
|
796
859
|
|
797
860
|
<div class="method-description">
|
798
861
|
<p><a class="source-toggle" href="#"
|
799
|
-
onclick="toggleCode('
|
800
|
-
<div class="method-source-code" id="
|
862
|
+
onclick="toggleCode('M000121-source');return false;">[Source]</a></p>
|
863
|
+
<div class="method-source-code" id="M000121-source">
|
801
864
|
<pre>
|
802
|
-
<span class="ruby-comment cmt"># File rook/kitchen.rb, line
|
865
|
+
<span class="ruby-comment cmt"># File rook/kitchen.rb, line 400</span>
|
803
866
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">load_script</span>(<span class="ruby-identifier">filename</span>)
|
804
867
|
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">instance_eval</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">read</span>(<span class="ruby-identifier">filename</span>), <span class="ruby-identifier">filename</span>, <span class="ruby-value">1</span>
|
805
868
|
<span class="ruby-keyword kw">end</span>
|
@@ -808,12 +871,58 @@ attr_reader :forced, :quiet, :noexec
|
|
808
871
|
</div>
|
809
872
|
</div>
|
810
873
|
|
874
|
+
<div id="method-M000122" class="method-detail">
|
875
|
+
<a name="M000122"></a>
|
876
|
+
|
877
|
+
<div class="method-heading">
|
878
|
+
<a href="#M000122" class="method-signature">
|
879
|
+
<span class="method-name">load_script!</span><span class="method-args">(script, filename)</span>
|
880
|
+
</a>
|
881
|
+
</div>
|
882
|
+
|
883
|
+
<div class="method-description">
|
884
|
+
<p><a class="source-toggle" href="#"
|
885
|
+
onclick="toggleCode('M000122-source');return false;">[Source]</a></p>
|
886
|
+
<div class="method-source-code" id="M000122-source">
|
887
|
+
<pre>
|
888
|
+
<span class="ruby-comment cmt"># File rook/kitchen.rb, line 404</span>
|
889
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">load_script!</span>(<span class="ruby-identifier">script</span>, <span class="ruby-identifier">filename</span>)
|
890
|
+
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">instance_eval</span> <span class="ruby-identifier">script</span>, <span class="ruby-identifier">filename</span>, <span class="ruby-value">1</span>
|
891
|
+
<span class="ruby-keyword kw">end</span>
|
892
|
+
</pre>
|
893
|
+
</div>
|
894
|
+
</div>
|
895
|
+
</div>
|
896
|
+
|
897
|
+
<div id="method-M000116" class="method-detail">
|
898
|
+
<a name="M000116"></a>
|
899
|
+
|
900
|
+
<div class="method-heading">
|
901
|
+
<a href="#M000116" class="method-signature">
|
902
|
+
<span class="method-name">parameter_names</span><span class="method-args">()</span>
|
903
|
+
</a>
|
904
|
+
</div>
|
905
|
+
|
906
|
+
<div class="method-description">
|
907
|
+
<p><a class="source-toggle" href="#"
|
908
|
+
onclick="toggleCode('M000116-source');return false;">[Source]</a></p>
|
909
|
+
<div class="method-source-code" id="M000116-source">
|
910
|
+
<pre>
|
911
|
+
<span class="ruby-comment cmt"># File rook/kitchen.rb, line 352</span>
|
912
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">parameter_names</span>
|
913
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@value_table</span>.<span class="ruby-identifier">parameter_names</span>
|
914
|
+
<span class="ruby-keyword kw">end</span>
|
915
|
+
</pre>
|
916
|
+
</div>
|
917
|
+
</div>
|
918
|
+
</div>
|
919
|
+
|
811
920
|
<div id="method-M000115" class="method-detail">
|
812
921
|
<a name="M000115"></a>
|
813
922
|
|
814
923
|
<div class="method-heading">
|
815
924
|
<a href="#M000115" class="method-signature">
|
816
|
-
<span class="method-name">
|
925
|
+
<span class="method-name">property_names</span><span class="method-args">()</span>
|
817
926
|
</a>
|
818
927
|
</div>
|
819
928
|
|
@@ -822,30 +931,76 @@ attr_reader :forced, :quiet, :noexec
|
|
822
931
|
onclick="toggleCode('M000115-source');return false;">[Source]</a></p>
|
823
932
|
<div class="method-source-code" id="M000115-source">
|
824
933
|
<pre>
|
825
|
-
<span class="ruby-comment cmt"># File rook/kitchen.rb, line
|
826
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">
|
827
|
-
<span class="ruby-keyword kw">
|
934
|
+
<span class="ruby-comment cmt"># File rook/kitchen.rb, line 348</span>
|
935
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">property_names</span>
|
936
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@value_table</span>.<span class="ruby-identifier">property_names</span>
|
828
937
|
<span class="ruby-keyword kw">end</span>
|
829
938
|
</pre>
|
830
939
|
</div>
|
831
940
|
</div>
|
832
941
|
</div>
|
833
942
|
|
834
|
-
<div id="method-
|
835
|
-
<a name="
|
943
|
+
<div id="method-M000113" class="method-detail">
|
944
|
+
<a name="M000113"></a>
|
836
945
|
|
837
946
|
<div class="method-heading">
|
838
|
-
<a href="#
|
947
|
+
<a href="#M000113" class="method-signature">
|
948
|
+
<span class="method-name">set_parameter</span><span class="method-args">(name, value)</span>
|
949
|
+
</a>
|
950
|
+
</div>
|
951
|
+
|
952
|
+
<div class="method-description">
|
953
|
+
<p><a class="source-toggle" href="#"
|
954
|
+
onclick="toggleCode('M000113-source');return false;">[Source]</a></p>
|
955
|
+
<div class="method-source-code" id="M000113-source">
|
956
|
+
<pre>
|
957
|
+
<span class="ruby-comment cmt"># File rook/kitchen.rb, line 340</span>
|
958
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">set_parameter</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">value</span>)
|
959
|
+
<span class="ruby-ivar">@value_table</span>.<span class="ruby-identifier">set_parameter</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">value</span>)
|
960
|
+
<span class="ruby-keyword kw">end</span>
|
961
|
+
</pre>
|
962
|
+
</div>
|
963
|
+
</div>
|
964
|
+
</div>
|
965
|
+
|
966
|
+
<div id="method-M000112" class="method-detail">
|
967
|
+
<a name="M000112"></a>
|
968
|
+
|
969
|
+
<div class="method-heading">
|
970
|
+
<a href="#M000112" class="method-signature">
|
971
|
+
<span class="method-name">set_property</span><span class="method-args">(name, value)</span>
|
972
|
+
</a>
|
973
|
+
</div>
|
974
|
+
|
975
|
+
<div class="method-description">
|
976
|
+
<p><a class="source-toggle" href="#"
|
977
|
+
onclick="toggleCode('M000112-source');return false;">[Source]</a></p>
|
978
|
+
<div class="method-source-code" id="M000112-source">
|
979
|
+
<pre>
|
980
|
+
<span class="ruby-comment cmt"># File rook/kitchen.rb, line 336</span>
|
981
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">set_property</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">value</span>)
|
982
|
+
<span class="ruby-ivar">@value_table</span>.<span class="ruby-identifier">set_property</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">value</span>)
|
983
|
+
<span class="ruby-keyword kw">end</span>
|
984
|
+
</pre>
|
985
|
+
</div>
|
986
|
+
</div>
|
987
|
+
</div>
|
988
|
+
|
989
|
+
<div id="method-M000131" class="method-detail">
|
990
|
+
<a name="M000131"></a>
|
991
|
+
|
992
|
+
<div class="method-heading">
|
993
|
+
<a href="#M000131" class="method-signature">
|
839
994
|
<span class="method-name">start_cooking</span><span class="method-args">(product)</span>
|
840
995
|
</a>
|
841
996
|
</div>
|
842
997
|
|
843
998
|
<div class="method-description">
|
844
999
|
<p><a class="source-toggle" href="#"
|
845
|
-
onclick="toggleCode('
|
846
|
-
<div class="method-source-code" id="
|
1000
|
+
onclick="toggleCode('M000131-source');return false;">[Source]</a></p>
|
1001
|
+
<div class="method-source-code" id="M000131-source">
|
847
1002
|
<pre>
|
848
|
-
<span class="ruby-comment cmt"># File rook/kitchen.rb, line
|
1003
|
+
<span class="ruby-comment cmt"># File rook/kitchen.rb, line 506</span>
|
849
1004
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">start_cooking</span>(<span class="ruby-identifier">product</span>)
|
850
1005
|
<span class="ruby-identifier">cooking</span> = <span class="ruby-constant">Cooking</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">product</span>)
|
851
1006
|
<span class="ruby-keyword kw">begin</span>
|