rook 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (67) hide show
  1. data/LGPL +504 -0
  2. data/README.txt +15 -6
  3. data/bin/rook +1 -1
  4. data/doc-api/classes/BZ2/Reader.html +24 -24
  5. data/doc-api/classes/Digest/Base.html +18 -18
  6. data/doc-api/classes/Enumerable.html +55 -55
  7. data/doc-api/classes/File.html +53 -6
  8. data/doc-api/classes/FileUtils.html +90 -90
  9. data/doc-api/classes/Kernel.html +48 -48
  10. data/doc-api/classes/Rook.html +18 -5
  11. data/doc-api/classes/Rook/Assertion.html +29 -14
  12. data/doc-api/classes/Rook/Commands.html +296 -364
  13. data/doc-api/classes/Rook/Cookbook.html +165 -60
  14. data/doc-api/classes/Rook/CookbookError.html +7 -7
  15. data/doc-api/classes/Rook/CookbookValidator.html +24 -24
  16. data/doc-api/classes/Rook/Kitchen.html +379 -224
  17. data/doc-api/classes/Rook/KitchenHelper.html +69 -69
  18. data/doc-api/classes/Rook/Main.html +47 -30
  19. data/doc-api/classes/Rook/Recipe.html +63 -35
  20. data/doc-api/classes/Rook/Util.html +72 -68
  21. data/doc-api/classes/Rook/Util/UndefinedPropertyError.html +6 -6
  22. data/doc-api/classes/Rook/{Parameters.html → ValueTable.html} +129 -123
  23. data/doc-api/created.rid +1 -1
  24. data/doc-api/files/rook/commands_rb.html +2 -2
  25. data/doc-api/files/rook/cookbook_rb.html +2 -2
  26. data/doc-api/files/rook/helper/bz2_rb.html +1 -1
  27. data/doc-api/files/rook/helper/digest_rb.html +1 -1
  28. data/doc-api/files/rook/helper/enumerable_rb.html +1 -1
  29. data/doc-api/files/rook/helper/file_rb.html +2 -2
  30. data/doc-api/files/rook/helper/fileutils_rb.html +1 -1
  31. data/doc-api/files/rook/helper/kernel_rb.html +1 -1
  32. data/doc-api/files/rook/kitchen_rb.html +2 -2
  33. data/doc-api/files/rook/main_rb.html +2 -2
  34. data/doc-api/files/rook/recipe_rb.html +2 -2
  35. data/doc-api/files/rook/util_rb.html +2 -2
  36. data/doc-api/files/rook_rb.html +2 -2
  37. data/doc-api/fr_class_index.html +1 -1
  38. data/doc-api/fr_file_index.html +0 -1
  39. data/doc-api/fr_method_index.html +148 -140
  40. data/doc-api/index.html +1 -1
  41. data/examples/hello_c/Rookbook.rb +1 -1
  42. data/examples/hello_c/Rookbook.yaml +8 -8
  43. data/examples/project/README.txt +2 -2
  44. data/examples/project/Rookbook.rb +20 -19
  45. data/examples/project/Rookbook.yaml +30 -28
  46. data/examples/project/bin/example +2 -2
  47. data/examples/project/example.gemspec +1 -1
  48. data/examples/project/lib/example.rb +2 -2
  49. data/examples/project/test/test.rb +2 -2
  50. data/lib/rook.rb +5 -2
  51. data/lib/rook/commands.rb +28 -17
  52. data/lib/rook/cookbook.rb +107 -92
  53. data/lib/rook/helper/bz2.rb +1 -1
  54. data/lib/rook/helper/digest.rb +1 -1
  55. data/lib/rook/helper/enumerable.rb +1 -1
  56. data/lib/rook/helper/file.rb +28 -3
  57. data/lib/rook/helper/fileutils.rb +1 -1
  58. data/lib/rook/helper/kernel.rb +1 -1
  59. data/lib/rook/kitchen.rb +138 -100
  60. data/lib/rook/main.rb +72 -47
  61. data/lib/rook/recipe.rb +51 -35
  62. data/lib/rook/rookbook.schema.yaml +34 -54
  63. data/lib/rook/util.rb +22 -8
  64. data/rook.gemspec +5 -5
  65. metadata +5 -7
  66. data/COPYING +0 -340
  67. data/doc-api/files/__/README_txt.html +0 -313
@@ -101,11 +101,13 @@ ex.
101
101
  <h3 class="section-bar">Methods</h3>
102
102
 
103
103
  <div class="name-list">
104
- <a href="#M000129">load_yamlfile</a>&nbsp;&nbsp;
105
- <a href="#M000130">load_yamlstr</a>&nbsp;&nbsp;
106
- <a href="#M000131">load_ydoc</a>&nbsp;&nbsp;
107
- <a href="#M000127">new</a>&nbsp;&nbsp;
108
- <a href="#M000128">precooking</a>&nbsp;&nbsp;
104
+ <a href="#M000139">_add_code</a>&nbsp;&nbsp;
105
+ <a href="#M000135">load_yamlfile</a>&nbsp;&nbsp;
106
+ <a href="#M000136">load_yamlstr</a>&nbsp;&nbsp;
107
+ <a href="#M000137">load_ydoc</a>&nbsp;&nbsp;
108
+ <a href="#M000133">new</a>&nbsp;&nbsp;
109
+ <a href="#M000134">preparation</a>&nbsp;&nbsp;
110
+ <a href="#M000138">validate_rubycode</a>&nbsp;&nbsp;
109
111
  </div>
110
112
  </div>
111
113
 
@@ -143,22 +145,22 @@ ex.
143
145
  <td class="context-item-desc"></td>
144
146
  </tr>
145
147
  <tr class="top-aligned-row context-row">
146
- <td class="context-item-name">precookings</td>
148
+ <td class="context-item-name">parameters</td>
147
149
  <td class="context-item-value">&nbsp;[R]&nbsp;</td>
148
150
  <td class="context-item-desc"></td>
149
151
  </tr>
150
152
  <tr class="top-aligned-row context-row">
151
- <td class="context-item-name">properties</td>
153
+ <td class="context-item-name">preparations</td>
152
154
  <td class="context-item-value">&nbsp;[R]&nbsp;</td>
153
155
  <td class="context-item-desc"></td>
154
156
  </tr>
155
157
  <tr class="top-aligned-row context-row">
156
- <td class="context-item-name">recipes</td>
158
+ <td class="context-item-name">properties</td>
157
159
  <td class="context-item-value">&nbsp;[R]&nbsp;</td>
158
160
  <td class="context-item-desc"></td>
159
161
  </tr>
160
162
  <tr class="top-aligned-row context-row">
161
- <td class="context-item-name">variables</td>
163
+ <td class="context-item-name">recipes</td>
162
164
  <td class="context-item-value">&nbsp;[R]&nbsp;</td>
163
165
  <td class="context-item-desc"></td>
164
166
  </tr>
@@ -172,25 +174,25 @@ ex.
172
174
  <div id="methods">
173
175
  <h3 class="section-bar">Public Class methods</h3>
174
176
 
175
- <div id="method-M000127" class="method-detail">
176
- <a name="M000127"></a>
177
+ <div id="method-M000133" class="method-detail">
178
+ <a name="M000133"></a>
177
179
 
178
180
  <div class="method-heading">
179
- <a href="#M000127" class="method-signature">
181
+ <a href="#M000133" class="method-signature">
180
182
  <span class="method-name">new</span><span class="method-args">(bookname=nil, load_yaml=true, expand_tab=true)</span>
181
183
  </a>
182
184
  </div>
183
185
 
184
186
  <div class="method-description">
185
187
  <p><a class="source-toggle" href="#"
186
- onclick="toggleCode('M000127-source');return false;">[Source]</a></p>
187
- <div class="method-source-code" id="M000127-source">
188
+ onclick="toggleCode('M000133-source');return false;">[Source]</a></p>
189
+ <div class="method-source-code" id="M000133-source">
188
190
  <pre>
189
191
  <span class="ruby-comment cmt"># File rook/cookbook.rb, line 101</span>
190
192
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">bookname</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">load_yaml</span>=<span class="ruby-keyword kw">true</span>, <span class="ruby-identifier">expand_tab</span>=<span class="ruby-keyword kw">true</span>)
191
- <span class="ruby-ivar">@precookings</span> = []
193
+ <span class="ruby-ivar">@preparations</span> = []
192
194
  <span class="ruby-ivar">@properties</span> = []
193
- <span class="ruby-ivar">@variables</span> = []
195
+ <span class="ruby-ivar">@parameters</span> = []
194
196
  <span class="ruby-ivar">@materials</span> = []
195
197
  <span class="ruby-ivar">@recipes</span> = []
196
198
  <span class="ruby-ivar">@bookname</span> = <span class="ruby-identifier">bookname</span>
@@ -203,19 +205,47 @@ ex.
203
205
 
204
206
  <h3 class="section-bar">Public Instance methods</h3>
205
207
 
206
- <div id="method-M000129" class="method-detail">
207
- <a name="M000129"></a>
208
+ <div id="method-M000139" class="method-detail">
209
+ <a name="M000139"></a>
210
+
211
+ <div class="method-heading">
212
+ <a href="#M000139" class="method-signature">
213
+ <span class="method-name">_add_code</span><span class="method-args">(lines, hash, key)</span>
214
+ </a>
215
+ </div>
216
+
217
+ <div class="method-description">
218
+ <p><a class="source-toggle" href="#"
219
+ onclick="toggleCode('M000139-source');return false;">[Source]</a></p>
220
+ <div class="method-source-code" id="M000139-source">
221
+ <pre>
222
+ <span class="ruby-comment cmt"># File rook/cookbook.rb, line 238</span>
223
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">_add_code</span>(<span class="ruby-identifier">lines</span>, <span class="ruby-identifier">hash</span>, <span class="ruby-identifier">key</span>)
224
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">hash</span>.<span class="ruby-identifier">key?</span>(<span class="ruby-identifier">key</span>)
225
+ <span class="ruby-identifier">code</span> = <span class="ruby-identifier">hash</span>[<span class="ruby-identifier">key</span>]
226
+ <span class="ruby-identifier">n</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>
227
+ <span class="ruby-identifier">code</span>.<span class="ruby-identifier">each_line</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">line</span><span class="ruby-operator">|</span> <span class="ruby-identifier">lines</span>[<span class="ruby-identifier">n</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>] = <span class="ruby-identifier">line</span>.<span class="ruby-identifier">chomp</span> }
228
+ <span class="ruby-identifier">lines</span>[<span class="ruby-identifier">n</span>] = <span class="ruby-identifier">lines</span>[<span class="ruby-identifier">n</span>] <span class="ruby-operator">+</span> <span class="ruby-value str">';'</span>
229
+ <span class="ruby-keyword kw">end</span>
230
+ <span class="ruby-keyword kw">end</span>
231
+ </pre>
232
+ </div>
233
+ </div>
234
+ </div>
235
+
236
+ <div id="method-M000135" class="method-detail">
237
+ <a name="M000135"></a>
208
238
 
209
239
  <div class="method-heading">
210
- <a href="#M000129" class="method-signature">
240
+ <a href="#M000135" class="method-signature">
211
241
  <span class="method-name">load_yamlfile</span><span class="method-args">(bookname, tab_expand=true)</span>
212
242
  </a>
213
243
  </div>
214
244
 
215
245
  <div class="method-description">
216
246
  <p><a class="source-toggle" href="#"
217
- onclick="toggleCode('M000129-source');return false;">[Source]</a></p>
218
- <div class="method-source-code" id="M000129-source">
247
+ onclick="toggleCode('M000135-source');return false;">[Source]</a></p>
248
+ <div class="method-source-code" id="M000135-source">
219
249
  <pre>
220
250
  <span class="ruby-comment cmt"># File rook/cookbook.rb, line 119</span>
221
251
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">load_yamlfile</span>(<span class="ruby-identifier">bookname</span>, <span class="ruby-identifier">tab_expand</span>=<span class="ruby-keyword kw">true</span>)
@@ -228,19 +258,19 @@ ex.
228
258
  </div>
229
259
  </div>
230
260
 
231
- <div id="method-M000130" class="method-detail">
232
- <a name="M000130"></a>
261
+ <div id="method-M000136" class="method-detail">
262
+ <a name="M000136"></a>
233
263
 
234
264
  <div class="method-heading">
235
- <a href="#M000130" class="method-signature">
265
+ <a href="#M000136" class="method-signature">
236
266
  <span class="method-name">load_yamlstr</span><span class="method-args">(yaml_str)</span>
237
267
  </a>
238
268
  </div>
239
269
 
240
270
  <div class="method-description">
241
271
  <p><a class="source-toggle" href="#"
242
- onclick="toggleCode('M000130-source');return false;">[Source]</a></p>
243
- <div class="method-source-code" id="M000130-source">
272
+ onclick="toggleCode('M000136-source');return false;">[Source]</a></p>
273
+ <div class="method-source-code" id="M000136-source">
244
274
  <pre>
245
275
  <span class="ruby-comment cmt"># File rook/cookbook.rb, line 126</span>
246
276
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">load_yamlstr</span>(<span class="ruby-identifier">yaml_str</span>)
@@ -264,78 +294,153 @@ ex.
264
294
  </div>
265
295
  </div>
266
296
 
267
- <div id="method-M000131" class="method-detail">
268
- <a name="M000131"></a>
297
+ <div id="method-M000137" class="method-detail">
298
+ <a name="M000137"></a>
269
299
 
270
300
  <div class="method-heading">
271
- <a href="#M000131" class="method-signature">
301
+ <a href="#M000137" class="method-signature">
272
302
  <span class="method-name">load_ydoc</span><span class="method-args">(ydoc, parser=nil)</span>
273
303
  </a>
274
304
  </div>
275
305
 
276
306
  <div class="method-description">
277
307
  <p><a class="source-toggle" href="#"
278
- onclick="toggleCode('M000131-source');return false;">[Source]</a></p>
279
- <div class="method-source-code" id="M000131-source">
308
+ onclick="toggleCode('M000137-source');return false;">[Source]</a></p>
309
+ <div class="method-source-code" id="M000137-source">
280
310
  <pre>
281
311
  <span class="ruby-comment cmt"># File rook/cookbook.rb, line 144</span>
282
312
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">load_ydoc</span>(<span class="ruby-identifier">ydoc</span>, <span class="ruby-identifier">parser</span>=<span class="ruby-keyword kw">nil</span>)
283
313
  <span class="ruby-identifier">ydoc</span> = <span class="ruby-identifier">ydoc</span>.<span class="ruby-identifier">dup</span>
284
- <span class="ruby-comment cmt">#</span>
285
- <span class="ruby-identifier">code</span> = <span class="ruby-identifier">ydoc</span>[<span class="ruby-value str">'precooking'</span>]
286
- <span class="ruby-identifier">ydoc</span>[<span class="ruby-value str">'precookings'</span>] = [ { <span class="ruby-value str">'code'</span>=<span class="ruby-operator">&gt;</span><span class="ruby-identifier">code</span> } ] <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">code</span>
287
- <span class="ruby-comment cmt">#</span>
288
- [ <span class="ruby-value str">'properties'</span>, <span class="ruby-value str">'variables'</span> ].<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">key</span><span class="ruby-operator">|</span>
289
- <span class="ruby-keyword kw">next</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">ydoc</span>[<span class="ruby-identifier">key</span>]
290
- <span class="ruby-identifier">list</span> = []
291
- <span class="ruby-identifier">ydoc</span>[<span class="ruby-identifier">key</span>].<span class="ruby-identifier">each_with_index</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">prop</span>, <span class="ruby-identifier">i</span><span class="ruby-operator">|</span>
314
+ <span class="ruby-comment cmt"># preparation</span>
315
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">code</span> = <span class="ruby-identifier">ydoc</span>[<span class="ruby-value str">'preparation*'</span>]
316
+ <span class="ruby-identifier">linenum</span> = <span class="ruby-identifier">parser</span>.<span class="ruby-identifier">path_linenum</span>(<span class="ruby-value str">'/preparation*'</span>)
317
+ <span class="ruby-ivar">@preparations</span> <span class="ruby-operator">&lt;&lt;</span> { <span class="ruby-value str">'code'</span>=<span class="ruby-operator">&gt;</span><span class="ruby-identifier">code</span>, <span class="ruby-value str">'linenum'</span>=<span class="ruby-operator">&gt;</span><span class="ruby-identifier">linenum</span><span class="ruby-operator">+</span><span class="ruby-value">1</span> }
318
+ <span class="ruby-keyword kw">end</span>
319
+ <span class="ruby-comment cmt"># properties, parameters</span>
320
+ [ <span class="ruby-value str">'properties'</span>, <span class="ruby-value str">'parameters'</span> ].<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">part</span><span class="ruby-operator">|</span>
321
+ <span class="ruby-keyword kw">next</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">ydoc</span>[<span class="ruby-identifier">part</span>]
322
+ <span class="ruby-identifier">list</span> = <span class="ruby-identifier">part</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'properties'</span> <span class="ruby-operator">?</span> <span class="ruby-ivar">@properties</span> <span class="ruby-operator">:</span> <span class="ruby-ivar">@parameters</span>
323
+ <span class="ruby-identifier">ydoc</span>[<span class="ruby-identifier">part</span>].<span class="ruby-identifier">each_with_index</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">prop</span>, <span class="ruby-identifier">i</span><span class="ruby-operator">|</span>
292
324
  <span class="ruby-identifier">opts</span> = {}
293
325
  <span class="ruby-identifier">prop</span>.<span class="ruby-identifier">keys</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">k</span><span class="ruby-operator">|</span> <span class="ruby-identifier">opts</span>[<span class="ruby-identifier">k</span>.<span class="ruby-identifier">to_s</span>] = <span class="ruby-identifier">prop</span>[<span class="ruby-identifier">k</span>] <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">k</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Symbol</span>) <span class="ruby-keyword kw">end</span>
294
326
  <span class="ruby-identifier">prop</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">val</span><span class="ruby-operator">|</span>
295
327
  <span class="ruby-keyword kw">next</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">name</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">String</span>)
296
- <span class="ruby-identifier">vkey</span> = <span class="ruby-identifier">name</span>[<span class="ruby-value">-1</span>] <span class="ruby-operator">==</span> <span class="ruby-value">?*</span> <span class="ruby-operator">?</span> <span class="ruby-value str">'expr'</span> <span class="ruby-operator">:</span> <span class="ruby-value str">'value'</span>
328
+ <span class="ruby-identifier">linenum</span> = <span class="ruby-identifier">parser</span>.<span class="ruby-identifier">path_linenum</span>(<span class="ruby-node">&quot;/#{part}/#{i}/#{name}&quot;</span>)
329
+ <span class="ruby-identifier">vkey</span> = <span class="ruby-identifier">name</span>[<span class="ruby-value">-1</span>] <span class="ruby-operator">==</span> <span class="ruby-value">?*</span> <span class="ruby-operator">?</span> <span class="ruby-value str">'value*'</span> <span class="ruby-operator">:</span> <span class="ruby-value str">'value'</span>
297
330
  <span class="ruby-comment cmt">#name[-1,1] = '' if name[-1] == ?* # TypeError: can't modify frozen string</span>
298
331
  <span class="ruby-identifier">name</span> = <span class="ruby-identifier">name</span>[<span class="ruby-value">0</span>, <span class="ruby-identifier">name</span>.<span class="ruby-identifier">length</span><span class="ruby-operator">-</span><span class="ruby-value">1</span>] <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">name</span>[<span class="ruby-value">-1</span>] <span class="ruby-operator">==</span> <span class="ruby-value">?*</span>
299
- <span class="ruby-identifier">h</span> = { <span class="ruby-value str">'name'</span>=<span class="ruby-operator">&gt;</span><span class="ruby-identifier">name</span>, <span class="ruby-identifier">vkey</span>=<span class="ruby-operator">&gt;</span><span class="ruby-identifier">val</span> }
332
+ <span class="ruby-identifier">h</span> = { <span class="ruby-value str">'name'</span>=<span class="ruby-operator">&gt;</span><span class="ruby-identifier">name</span>, <span class="ruby-identifier">vkey</span>=<span class="ruby-operator">&gt;</span><span class="ruby-identifier">val</span>, <span class="ruby-value str">'linenum'</span>=<span class="ruby-operator">&gt;</span><span class="ruby-identifier">linenum</span> }
300
333
  <span class="ruby-identifier">h</span>.<span class="ruby-identifier">update</span>(<span class="ruby-identifier">opts</span>)
301
334
  <span class="ruby-identifier">list</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">h</span>
302
335
  <span class="ruby-keyword kw">end</span>
303
336
  <span class="ruby-keyword kw">end</span>
304
- <span class="ruby-identifier">ydoc</span>[<span class="ruby-identifier">key</span>] = <span class="ruby-identifier">list</span>
305
337
  <span class="ruby-keyword kw">end</span>
306
- <span class="ruby-comment cmt">#</span>
307
- <span class="ruby-ivar">@precookings</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">_load_section</span>(<span class="ruby-identifier">ydoc</span>[<span class="ruby-value str">'precookings'</span>], <span class="ruby-value str">'code'</span>, <span class="ruby-identifier">parser</span>, <span class="ruby-value">1</span>) { <span class="ruby-operator">|</span><span class="ruby-identifier">h</span>, <span class="ruby-identifier">i</span><span class="ruby-operator">|</span> <span class="ruby-value str">&quot;/precooking&quot;</span> }
308
- <span class="ruby-ivar">@recipes</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">_load_section</span>(<span class="ruby-identifier">ydoc</span>[<span class="ruby-value str">'recipes'</span>], <span class="ruby-value str">'method'</span>, <span class="ruby-identifier">parser</span>, <span class="ruby-value">1</span>) { <span class="ruby-operator">|</span><span class="ruby-identifier">h</span>, <span class="ruby-identifier">i</span><span class="ruby-operator">|</span> <span class="ruby-node">&quot;/recipes/#{i}/method&quot;</span> }
309
- <span class="ruby-ivar">@properties</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">_load_section</span>(<span class="ruby-identifier">ydoc</span>[<span class="ruby-value str">'properties*'</span>], <span class="ruby-value str">'expr'</span>, <span class="ruby-identifier">parser</span>, <span class="ruby-value">0</span>) { <span class="ruby-operator">|</span><span class="ruby-identifier">h</span>, <span class="ruby-identifier">i</span><span class="ruby-operator">|</span> <span class="ruby-node">&quot;/properties*/#{i}/expr&quot;</span> }
310
- <span class="ruby-ivar">@variables</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">_load_section</span>(<span class="ruby-identifier">ydoc</span>[<span class="ruby-value str">'variables*'</span>], <span class="ruby-value str">'expr'</span>, <span class="ruby-identifier">parser</span>, <span class="ruby-value">0</span>) { <span class="ruby-operator">|</span><span class="ruby-identifier">h</span>, <span class="ruby-identifier">i</span><span class="ruby-operator">|</span> <span class="ruby-node">&quot;/variables*/#{i}/expr&quot;</span> }
311
- <span class="ruby-ivar">@properties</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">_load_section</span>(<span class="ruby-identifier">ydoc</span>[<span class="ruby-value str">'properties'</span>], <span class="ruby-value str">'expr'</span>, <span class="ruby-identifier">parser</span>, <span class="ruby-value">0</span>) { <span class="ruby-operator">|</span><span class="ruby-identifier">h</span>, <span class="ruby-identifier">i</span><span class="ruby-operator">|</span> <span class="ruby-node">&quot;/properties/#{i}/#{h['name']}*&quot;</span> }
312
- <span class="ruby-ivar">@variables</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">_load_section</span>(<span class="ruby-identifier">ydoc</span>[<span class="ruby-value str">'variables'</span>], <span class="ruby-value str">'expr'</span>, <span class="ruby-identifier">parser</span>, <span class="ruby-value">0</span>) { <span class="ruby-operator">|</span><span class="ruby-identifier">h</span>, <span class="ruby-identifier">i</span><span class="ruby-operator">|</span> <span class="ruby-node">&quot;/variables/#{i}/#{h['name']}*&quot;</span> }
313
- <span class="ruby-comment cmt">#</span>
314
- <span class="ruby-identifier">list</span> = <span class="ruby-identifier">ydoc</span>[<span class="ruby-value str">'materials'</span>]
315
- <span class="ruby-ivar">@materials</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">list</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">list</span>
338
+ <span class="ruby-comment cmt"># materials</span>
339
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">list</span> = <span class="ruby-identifier">ydoc</span>[<span class="ruby-value str">'materials'</span>]
340
+ <span class="ruby-ivar">@materials</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">list</span>
341
+ <span class="ruby-keyword kw">end</span>
342
+ <span class="ruby-comment cmt"># recipes</span>
343
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">list</span> = <span class="ruby-identifier">ydoc</span>[<span class="ruby-value str">'recipes'</span>]
344
+ <span class="ruby-identifier">list</span>.<span class="ruby-identifier">each_with_index</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">hash</span>, <span class="ruby-identifier">i</span><span class="ruby-operator">|</span>
345
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">hash</span>[<span class="ruby-value str">'method*'</span>]
346
+ <span class="ruby-identifier">linenum</span> = <span class="ruby-identifier">parser</span>.<span class="ruby-identifier">path_linenum</span>(<span class="ruby-node">&quot;/recipes/#{i}/method*&quot;</span>)
347
+ <span class="ruby-identifier">hash</span>[<span class="ruby-value str">'linenum'</span>] = <span class="ruby-identifier">linenum</span><span class="ruby-operator">+</span><span class="ruby-value">1</span>
348
+ <span class="ruby-keyword kw">end</span>
349
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">hash</span>[<span class="ruby-value str">'params'</span>]
350
+ <span class="ruby-identifier">list</span> = []
351
+ <span class="ruby-identifier">hash</span>[<span class="ruby-value str">'params'</span>].<span class="ruby-identifier">each_with_index</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">params</span>, <span class="ruby-identifier">n</span><span class="ruby-operator">|</span>
352
+ <span class="ruby-identifier">params</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">val</span><span class="ruby-operator">|</span>
353
+ <span class="ruby-identifier">linenum</span> = <span class="ruby-identifier">parser</span>.<span class="ruby-identifier">path_linenum</span>(<span class="ruby-node">&quot;/recipes/#{i}/params/#{n}/#{name}&quot;</span>)
354
+ <span class="ruby-identifier">list</span> <span class="ruby-operator">&lt;&lt;</span> { <span class="ruby-value str">'name'</span>=<span class="ruby-operator">&gt;</span><span class="ruby-identifier">name</span>, <span class="ruby-value str">'value'</span>=<span class="ruby-operator">&gt;</span><span class="ruby-identifier">val</span>, <span class="ruby-value str">'linenum'</span>=<span class="ruby-operator">&gt;</span><span class="ruby-identifier">linenum</span> }
355
+ <span class="ruby-keyword kw">end</span>
356
+ <span class="ruby-keyword kw">end</span>
357
+ <span class="ruby-identifier">hash</span>[<span class="ruby-value str">'params'</span>] = <span class="ruby-identifier">list</span>
358
+ <span class="ruby-keyword kw">end</span>
359
+ <span class="ruby-ivar">@recipes</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">hash</span>
360
+ <span class="ruby-keyword kw">end</span>
361
+ <span class="ruby-keyword kw">end</span>
316
362
  <span class="ruby-keyword kw">end</span>
317
363
  </pre>
318
364
  </div>
319
365
  </div>
320
366
  </div>
321
367
 
322
- <div id="method-M000128" class="method-detail">
323
- <a name="M000128"></a>
368
+ <div id="method-M000134" class="method-detail">
369
+ <a name="M000134"></a>
324
370
 
325
371
  <div class="method-heading">
326
- <a href="#M000128" class="method-signature">
327
- <span class="method-name">precooking</span><span class="method-args">()</span>
372
+ <a href="#M000134" class="method-signature">
373
+ <span class="method-name">preparation</span><span class="method-args">()</span>
328
374
  </a>
329
375
  </div>
330
376
 
331
377
  <div class="method-description">
332
378
  <p><a class="source-toggle" href="#"
333
- onclick="toggleCode('M000128-source');return false;">[Source]</a></p>
334
- <div class="method-source-code" id="M000128-source">
379
+ onclick="toggleCode('M000134-source');return false;">[Source]</a></p>
380
+ <div class="method-source-code" id="M000134-source">
335
381
  <pre>
336
382
  <span class="ruby-comment cmt"># File rook/cookbook.rb, line 114</span>
337
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">precooking</span>
338
- <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@precookings</span>.<span class="ruby-identifier">map</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">hash</span><span class="ruby-operator">|</span> <span class="ruby-identifier">hash</span>[<span class="ruby-value str">'code'</span>] }.<span class="ruby-identifier">join</span>(<span class="ruby-value str">&quot;\n&quot;</span>)
383
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">preparation</span>
384
+ <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@preparations</span>.<span class="ruby-identifier">map</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">hash</span><span class="ruby-operator">|</span> <span class="ruby-identifier">hash</span>[<span class="ruby-value str">'code'</span>] }.<span class="ruby-identifier">join</span>(<span class="ruby-value str">&quot;\n&quot;</span>)
385
+ <span class="ruby-keyword kw">end</span>
386
+ </pre>
387
+ </div>
388
+ </div>
389
+ </div>
390
+
391
+ <div id="method-M000138" class="method-detail">
392
+ <a name="M000138"></a>
393
+
394
+ <div class="method-heading">
395
+ <a href="#M000138" class="method-signature">
396
+ <span class="method-name">validate_rubycode</span><span class="method-args">()</span>
397
+ </a>
398
+ </div>
399
+
400
+ <div class="method-description">
401
+ <p><a class="source-toggle" href="#"
402
+ onclick="toggleCode('M000138-source');return false;">[Source]</a></p>
403
+ <div class="method-source-code" id="M000138-source">
404
+ <pre>
405
+ <span class="ruby-comment cmt"># File rook/cookbook.rb, line 197</span>
406
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">validate_rubycode</span>
407
+ <span class="ruby-identifier">lines</span> = []
408
+ <span class="ruby-ivar">@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>
409
+ <span class="ruby-identifier">_add_code</span>(<span class="ruby-identifier">lines</span>, <span class="ruby-identifier">hash</span>, <span class="ruby-value str">'code'</span>)
410
+ <span class="ruby-keyword kw">end</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@preparations</span>
411
+ <span class="ruby-ivar">@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>
412
+ <span class="ruby-identifier">_add_code</span>(<span class="ruby-identifier">lines</span>, <span class="ruby-identifier">hash</span>, <span class="ruby-value str">'value*'</span>) <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>)
413
+ <span class="ruby-keyword kw">end</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@properties</span>
414
+ <span class="ruby-ivar">@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>
415
+ <span class="ruby-identifier">_add_code</span>(<span class="ruby-identifier">lines</span>, <span class="ruby-identifier">hash</span>, <span class="ruby-value str">'value*'</span>) <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>)
416
+ <span class="ruby-keyword kw">end</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@parameters</span>
417
+ <span class="ruby-ivar">@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>
418
+ <span class="ruby-identifier">_add_code</span>(<span class="ruby-identifier">lines</span>, <span class="ruby-identifier">hash</span>, <span class="ruby-value str">'method*'</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">hash</span>.<span class="ruby-identifier">key?</span>(<span class="ruby-value str">'method*'</span>)
419
+ <span class="ruby-identifier">hash</span>[<span class="ruby-value str">'params'</span>].<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">h</span><span class="ruby-operator">|</span>
420
+ <span class="ruby-identifier">name</span> = <span class="ruby-identifier">h</span>[<span class="ruby-value str">'name'</span>]
421
+ <span class="ruby-identifier">_add_code</span>(<span class="ruby-identifier">lines</span>, <span class="ruby-identifier">h</span>, <span class="ruby-value str">'value'</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">name</span>[<span class="ruby-value">-1</span>] <span class="ruby-operator">==</span> <span class="ruby-value">?*</span>
422
+ <span class="ruby-keyword kw">end</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">hash</span>.<span class="ruby-identifier">key?</span>(<span class="ruby-value str">'params'</span>)
423
+ <span class="ruby-keyword kw">end</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@recipes</span>
424
+ <span class="ruby-comment cmt">#</span>
425
+ <span class="ruby-identifier">lines</span>.<span class="ruby-identifier">shift</span> <span class="ruby-comment cmt"># ignore first item</span>
426
+ <span class="ruby-identifier">code</span> = <span class="ruby-value str">''</span>
427
+ <span class="ruby-identifier">lines</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">line</span><span class="ruby-operator">|</span>
428
+ <span class="ruby-identifier">code</span> <span class="ruby-operator">&lt;&lt;</span> (<span class="ruby-identifier">line</span> <span class="ruby-operator">||</span> <span class="ruby-value str">&quot;&quot;</span>) <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">&quot;\n&quot;</span>
429
+ <span class="ruby-keyword kw">end</span>
430
+ <span class="ruby-identifier">tmpfilename</span> = <span class="ruby-node">&quot;#{@bookname}.&quot;</span> <span class="ruby-comment cmt"># or user tmpfile library</span>
431
+ <span class="ruby-keyword kw">begin</span>
432
+ <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">tmpfilename</span>, <span class="ruby-value str">'w'</span>) { <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span> <span class="ruby-identifier">f</span>.<span class="ruby-identifier">write</span>(<span class="ruby-identifier">code</span>) }
433
+ <span class="ruby-comment cmt">#case RUBY_PLATFORM</span>
434
+ <span class="ruby-comment cmt">#when /linux/, /bsd/, /darwin/, /cygwin/</span>
435
+ <span class="ruby-identifier">out</span> = <span class="ruby-node">`ruby -wc #{tmpfilename} 2&gt;&amp;1`</span>
436
+ <span class="ruby-identifier">puts</span> <span class="ruby-identifier">out</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-node">/^#{tmpfilename}/</span>, <span class="ruby-identifier">bookname</span>)
437
+ <span class="ruby-comment cmt">#else</span>
438
+ <span class="ruby-comment cmt"># system &quot;ruby -wc #{tmpfilename}&quot;</span>
439
+ <span class="ruby-comment cmt">#end</span>
440
+ <span class="ruby-keyword kw">ensure</span>
441
+ <span class="ruby-constant">File</span>.<span class="ruby-identifier">unlink</span>(<span class="ruby-identifier">tmpfilename</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">test</span>(<span class="ruby-value">?f</span>, <span class="ruby-identifier">tmpfilename</span>)
442
+ <span class="ruby-keyword kw">end</span>
443
+
339
444
  <span class="ruby-keyword kw">end</span>
340
445
  </pre>
341
446
  </div>
@@ -88,7 +88,7 @@
88
88
  <h3 class="section-bar">Methods</h3>
89
89
 
90
90
  <div class="name-list">
91
- <a href="#M000106">new</a>&nbsp;&nbsp;
91
+ <a href="#M000094">new</a>&nbsp;&nbsp;
92
92
  </div>
93
93
  </div>
94
94
 
@@ -123,21 +123,21 @@
123
123
  <div id="methods">
124
124
  <h3 class="section-bar">Public Class methods</h3>
125
125
 
126
- <div id="method-M000106" class="method-detail">
127
- <a name="M000106"></a>
126
+ <div id="method-M000094" class="method-detail">
127
+ <a name="M000094"></a>
128
128
 
129
129
  <div class="method-heading">
130
- <a href="#M000106" class="method-signature">
130
+ <a href="#M000094" class="method-signature">
131
131
  <span class="method-name">new</span><span class="method-args">(message, validation_errors)</span>
132
132
  </a>
133
133
  </div>
134
134
 
135
135
  <div class="method-description">
136
136
  <p><a class="source-toggle" href="#"
137
- onclick="toggleCode('M000106-source');return false;">[Source]</a></p>
138
- <div class="method-source-code" id="M000106-source">
137
+ onclick="toggleCode('M000094-source');return false;">[Source]</a></p>
138
+ <div class="method-source-code" id="M000094-source">
139
139
  <pre>
140
- <span class="ruby-comment cmt"># File rook/cookbook.rb, line 73</span>
140
+ <span class="ruby-comment cmt"># File rook/cookbook.rb, line 21</span>
141
141
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">message</span>, <span class="ruby-identifier">validation_errors</span>)
142
142
  <span class="ruby-ivar">@errors</span> = <span class="ruby-identifier">validation_errors</span>
143
143
  <span class="ruby-keyword kw">end</span>
@@ -86,9 +86,9 @@
86
86
  <h3 class="section-bar">Methods</h3>
87
87
 
88
88
  <div class="name-list">
89
- <a href="#M000079">create_error</a>&nbsp;&nbsp;
90
- <a href="#M000078">new</a>&nbsp;&nbsp;
91
- <a href="#M000080">validate_hook</a>&nbsp;&nbsp;
89
+ <a href="#M000078">create_error</a>&nbsp;&nbsp;
90
+ <a href="#M000077">new</a>&nbsp;&nbsp;
91
+ <a href="#M000079">validate_hook</a>&nbsp;&nbsp;
92
92
  </div>
93
93
  </div>
94
94
 
@@ -110,21 +110,21 @@
110
110
  <div id="methods">
111
111
  <h3 class="section-bar">Public Class methods</h3>
112
112
 
113
- <div id="method-M000078" class="method-detail">
114
- <a name="M000078"></a>
113
+ <div id="method-M000077" class="method-detail">
114
+ <a name="M000077"></a>
115
115
 
116
116
  <div class="method-heading">
117
- <a href="#M000078" class="method-signature">
117
+ <a href="#M000077" class="method-signature">
118
118
  <span class="method-name">new</span><span class="method-args">()</span>
119
119
  </a>
120
120
  </div>
121
121
 
122
122
  <div class="method-description">
123
123
  <p><a class="source-toggle" href="#"
124
- onclick="toggleCode('M000078-source');return false;">[Source]</a></p>
125
- <div class="method-source-code" id="M000078-source">
124
+ onclick="toggleCode('M000077-source');return false;">[Source]</a></p>
125
+ <div class="method-source-code" id="M000077-source">
126
126
  <pre>
127
- <span class="ruby-comment cmt"># File rook/cookbook.rb, line 28</span>
127
+ <span class="ruby-comment cmt"># File rook/cookbook.rb, line 41</span>
128
128
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>()
129
129
  <span class="ruby-keyword kw">super</span>(<span class="ruby-ivar">@@schema</span>)
130
130
  <span class="ruby-keyword kw">end</span>
@@ -135,21 +135,21 @@
135
135
 
136
136
  <h3 class="section-bar">Public Instance methods</h3>
137
137
 
138
- <div id="method-M000079" class="method-detail">
139
- <a name="M000079"></a>
138
+ <div id="method-M000078" class="method-detail">
139
+ <a name="M000078"></a>
140
140
 
141
141
  <div class="method-heading">
142
- <a href="#M000079" class="method-signature">
142
+ <a href="#M000078" class="method-signature">
143
143
  <span class="method-name">create_error</span><span class="method-args">(path, message)</span>
144
144
  </a>
145
145
  </div>
146
146
 
147
147
  <div class="method-description">
148
148
  <p><a class="source-toggle" href="#"
149
- onclick="toggleCode('M000079-source');return false;">[Source]</a></p>
150
- <div class="method-source-code" id="M000079-source">
149
+ onclick="toggleCode('M000078-source');return false;">[Source]</a></p>
150
+ <div class="method-source-code" id="M000078-source">
151
151
  <pre>
152
- <span class="ruby-comment cmt"># File rook/cookbook.rb, line 33</span>
152
+ <span class="ruby-comment cmt"># File rook/cookbook.rb, line 46</span>
153
153
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">create_error</span>(<span class="ruby-identifier">path</span>, <span class="ruby-identifier">message</span>)
154
154
  <span class="ruby-keyword kw">return</span> <span class="ruby-constant">Kwalify</span><span class="ruby-operator">::</span><span class="ruby-constant">ValidationError</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">message</span>, <span class="ruby-identifier">path</span>)
155
155
  <span class="ruby-keyword kw">end</span>
@@ -158,21 +158,21 @@
158
158
  </div>
159
159
  </div>
160
160
 
161
- <div id="method-M000080" class="method-detail">
162
- <a name="M000080"></a>
161
+ <div id="method-M000079" class="method-detail">
162
+ <a name="M000079"></a>
163
163
 
164
164
  <div class="method-heading">
165
- <a href="#M000080" class="method-signature">
165
+ <a href="#M000079" class="method-signature">
166
166
  <span class="method-name">validate_hook</span><span class="method-args">(value, rule, path, errors)</span>
167
167
  </a>
168
168
  </div>
169
169
 
170
170
  <div class="method-description">
171
171
  <p><a class="source-toggle" href="#"
172
- onclick="toggleCode('M000080-source');return false;">[Source]</a></p>
173
- <div class="method-source-code" id="M000080-source">
172
+ onclick="toggleCode('M000079-source');return false;">[Source]</a></p>
173
+ <div class="method-source-code" id="M000079-source">
174
174
  <pre>
175
- <span class="ruby-comment cmt"># File rook/cookbook.rb, line 42</span>
175
+ <span class="ruby-comment cmt"># File rook/cookbook.rb, line 55</span>
176
176
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">validate_hook</span>(<span class="ruby-identifier">value</span>, <span class="ruby-identifier">rule</span>, <span class="ruby-identifier">path</span>, <span class="ruby-identifier">errors</span>)
177
177
  <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">rule</span>.<span class="ruby-identifier">name</span>
178
178
  <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'MATERIAL'</span>
@@ -186,9 +186,9 @@
186
186
  <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'PROP'</span>
187
187
  <span class="ruby-identifier">value</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">k</span>, <span class="ruby-identifier">v</span><span class="ruby-operator">|</span>
188
188
  <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">k</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">String</span>)
189
- <span class="ruby-identifier">errors</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">error</span>(<span class="ruby-node">&quot;#{path}/#{k}&quot;</span>, <span class="ruby-value str">&quot;property name is not a string.&quot;</span>)
190
- <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">k</span> <span class="ruby-operator">!~</span> <span class="ruby-regexp re">/\A[a-zA-Z_][-\w]*\*?\z/</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">k</span> <span class="ruby-operator">!=</span> <span class="ruby-value str">'.desc'</span>
191
- <span class="ruby-identifier">errors</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">error</span>(<span class="ruby-node">&quot;#{path}/#{k}&quot;</span>, <span class="ruby-value str">&quot;invlaid property name.&quot;</span>)
189
+ <span class="ruby-identifier">errors</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">create_error</span>(<span class="ruby-node">&quot;#{path}/#{k}&quot;</span>, <span class="ruby-value str">&quot;property name is not a string.&quot;</span>)
190
+ <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">k</span> <span class="ruby-operator">!~</span> <span class="ruby-regexp re">/\A[a-zA-Z_]\w*\*?\z/</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">k</span> <span class="ruby-operator">!=</span> <span class="ruby-value str">'.desc'</span>
191
+ <span class="ruby-identifier">errors</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">create_error</span>(<span class="ruby-node">&quot;#{path}/#{k}&quot;</span>, <span class="ruby-value str">&quot;invlaid property name.&quot;</span>)
192
192
  <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">k</span>[<span class="ruby-value">-1</span>] <span class="ruby-operator">==</span> <span class="ruby-value">?*</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-operator">!</span><span class="ruby-identifier">v</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">String</span>)
193
193
  <span class="ruby-identifier">errors</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">create_error</span>(<span class="ruby-node">&quot;#{path}/#{k}&quot;</span>, <span class="ruby-value str">&quot;expr is not a string.&quot;</span>)
194
194
  <span class="ruby-keyword kw">end</span>