kwalify 0.6.1 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (219) hide show
  1. data/CHANGES.txt +232 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.txt +16 -19
  4. data/bin/kwalify +3 -3
  5. data/contrib/inline-require +6 -4
  6. data/contrib/kwalify +3719 -2427
  7. data/doc-api/classes/CommandOptionError.html +17 -17
  8. data/doc-api/classes/CommandOptionParser.html +63 -63
  9. data/doc-api/classes/Kwalify.html +29 -7
  10. data/doc-api/classes/Kwalify/AssertionError.html +9 -9
  11. data/doc-api/classes/Kwalify/BaseError.html +72 -71
  12. data/doc-api/classes/Kwalify/BaseParser.html +461 -0
  13. data/doc-api/classes/Kwalify/CommandOptionError.html +11 -11
  14. data/doc-api/classes/Kwalify/ErrorHelper.html +51 -46
  15. data/doc-api/classes/Kwalify/HashInterface.html +13 -135
  16. data/doc-api/classes/Kwalify/Json.html +105 -0
  17. data/doc-api/classes/Kwalify/Main.html +129 -126
  18. data/doc-api/classes/Kwalify/MetaValidator.html +248 -232
  19. data/doc-api/classes/Kwalify/Parser.html +12 -12
  20. data/doc-api/classes/Kwalify/PlainYamlParser.html +166 -163
  21. data/doc-api/classes/Kwalify/PlainYamlParser/Alias.html +11 -11
  22. data/doc-api/classes/Kwalify/Rule.html +152 -130
  23. data/doc-api/classes/Kwalify/SchemaError.html +10 -10
  24. data/doc-api/classes/Kwalify/SyntaxError.html +185 -0
  25. data/doc-api/classes/Kwalify/Types.html +26 -25
  26. data/doc-api/classes/Kwalify/Util.html +389 -0
  27. data/doc-api/classes/Kwalify/Util/HashLike.html +246 -0
  28. data/doc-api/classes/Kwalify/Util/OrderedHash.html +330 -0
  29. data/doc-api/classes/Kwalify/ValidationError.html +10 -10
  30. data/doc-api/classes/Kwalify/Validator.html +153 -86
  31. data/doc-api/classes/Kwalify/Yaml.html +181 -0
  32. data/doc-api/classes/Kwalify/Yaml/Parser.html +1538 -0
  33. data/doc-api/classes/Kwalify/YamlParser.html +190 -183
  34. data/doc-api/classes/Kwalify/YamlSyntaxError.html +8 -57
  35. data/doc-api/created.rid +1 -1
  36. data/doc-api/files/__/README_txt.html +17 -22
  37. data/doc-api/files/kwalify/errors_rb.html +2 -2
  38. data/doc-api/files/kwalify/main_rb.html +4 -3
  39. data/doc-api/files/kwalify/messages_rb.html +2 -2
  40. data/doc-api/files/kwalify/meta-validator_rb.html +3 -3
  41. data/doc-api/files/kwalify/{util/yaml-helper_rb.html → parser/base_rb.html} +8 -6
  42. data/doc-api/files/kwalify/parser/yaml_rb.html +117 -0
  43. data/doc-api/files/kwalify/rule_rb.html +2 -2
  44. data/doc-api/files/kwalify/types_rb.html +2 -2
  45. data/doc-api/files/kwalify/util/assert-text-equal_rb.html +2 -2
  46. data/doc-api/files/kwalify/util/hash-interface_rb.html +9 -2
  47. data/doc-api/files/kwalify/util/hashlike_rb.html +107 -0
  48. data/doc-api/files/kwalify/util/option-parser_rb.html +2 -2
  49. data/doc-api/files/kwalify/util/ordered-hash_rb.html +107 -0
  50. data/doc-api/files/kwalify/util/testcase-helper_rb.html +2 -2
  51. data/doc-api/files/kwalify/util_rb.html +107 -0
  52. data/doc-api/files/kwalify/validator_rb.html +2 -2
  53. data/doc-api/files/kwalify/yaml-parser_rb.html +2 -2
  54. data/doc-api/files/kwalify_rb.html +3 -2
  55. data/doc-api/fr_class_index.html +8 -1
  56. data/doc-api/fr_file_index.html +5 -1
  57. data/doc-api/fr_method_index.html +128 -69
  58. data/doc/img/fig01.png +0 -0
  59. data/doc/users-guide.html +882 -717
  60. data/examples/address-book/address-book.schema.yaml +2 -2
  61. data/examples/data-binding/BABEL.data.yaml +63 -0
  62. data/examples/data-binding/BABEL.schema.yaml +31 -0
  63. data/examples/data-binding/Makefile +8 -0
  64. data/examples/data-binding/Rakefile +13 -0
  65. data/examples/data-binding/main.rb +27 -0
  66. data/examples/invoice/invoice.schema.yaml +3 -3
  67. data/examples/tapkit/tapkit.schema.yaml +2 -2
  68. data/lib/kwalify.rb +41 -4
  69. data/lib/kwalify/errors.rb +118 -96
  70. data/lib/kwalify/kwalify.schema.yaml +58 -0
  71. data/lib/kwalify/main.rb +384 -377
  72. data/lib/kwalify/messages.rb +41 -27
  73. data/lib/kwalify/meta-validator.rb +251 -331
  74. data/lib/kwalify/parser/base.rb +127 -0
  75. data/lib/kwalify/parser/yaml.rb +837 -0
  76. data/lib/kwalify/rule.rb +545 -487
  77. data/lib/kwalify/templates/genclass-java.eruby +189 -162
  78. data/lib/kwalify/templates/genclass-php.eruby +104 -0
  79. data/lib/kwalify/templates/genclass-ruby.eruby +95 -66
  80. data/lib/kwalify/types.rb +107 -106
  81. data/lib/kwalify/util.rb +157 -0
  82. data/lib/kwalify/util/assert-text-equal.rb +33 -31
  83. data/lib/kwalify/util/hash-interface.rb +11 -30
  84. data/lib/kwalify/util/hashlike.rb +51 -0
  85. data/lib/kwalify/util/option-parser.rb +144 -144
  86. data/lib/kwalify/util/ordered-hash.rb +57 -0
  87. data/lib/kwalify/util/testcase-helper.rb +3 -3
  88. data/lib/kwalify/validator.rb +267 -212
  89. data/lib/kwalify/yaml-parser.rb +822 -768
  90. data/setup.rb +861 -607
  91. data/test/Rookbook.yaml +10 -0
  92. data/test/{tmp.dir/Context.java → data/users-guide/AddressBook.java.expected} +11 -11
  93. data/test/data/users-guide/BABEL.data.yaml +24 -0
  94. data/test/data/users-guide/BABEL.schema.yaml +30 -0
  95. data/test/data/users-guide/ExampleAddressBook.java +47 -0
  96. data/test/{tmp.dir/Group.java → data/users-guide/Group.java.expected} +2 -11
  97. data/test/data/users-guide/Person.java.expected +44 -0
  98. data/test/data/users-guide/address_book.rb +52 -0
  99. data/test/data/users-guide/address_book.schema.yaml +28 -0
  100. data/test/data/users-guide/address_book.yaml +27 -0
  101. data/test/data/users-guide/answers-schema.yaml +12 -0
  102. data/test/data/users-guide/answers-validator.rb +52 -0
  103. data/test/data/users-guide/babel_genclass.result +26 -0
  104. data/test/data/users-guide/config.schema.yaml +7 -0
  105. data/test/data/users-guide/config.yaml +4 -0
  106. data/test/{tmp.dir/silent1.document → data/users-guide/document01a.yaml} +0 -0
  107. data/test/data/users-guide/document01b.yaml +3 -0
  108. data/test/data/users-guide/document02a.yaml +4 -0
  109. data/test/data/users-guide/document02b.yaml +4 -0
  110. data/test/data/users-guide/document03a.yaml +6 -0
  111. data/test/data/users-guide/document03b.yaml +6 -0
  112. data/test/data/users-guide/document04a.yaml +9 -0
  113. data/test/data/users-guide/document04b.yaml +9 -0
  114. data/test/data/users-guide/document05a.yaml +11 -0
  115. data/test/data/users-guide/document05b.yaml +12 -0
  116. data/test/data/users-guide/document06a.yaml +15 -0
  117. data/test/data/users-guide/document06b.yaml +16 -0
  118. data/test/data/users-guide/document07a.yaml +9 -0
  119. data/test/data/users-guide/document07b.yaml +7 -0
  120. data/test/data/users-guide/document12a.json +10 -0
  121. data/test/data/users-guide/document12b.json +6 -0
  122. data/test/data/users-guide/document13a.yaml +17 -0
  123. data/test/data/users-guide/document14a.yaml +3 -0
  124. data/test/data/users-guide/document14b.yaml +3 -0
  125. data/test/data/users-guide/document15a.yaml +6 -0
  126. data/test/data/users-guide/document15b.yaml +5 -0
  127. data/test/data/users-guide/example_address_book.rb +10 -0
  128. data/test/data/users-guide/example_address_book_java.result +32 -0
  129. data/test/data/users-guide/example_address_book_ruby.result +31 -0
  130. data/test/data/users-guide/genclass_java.result +4 -0
  131. data/test/data/users-guide/howto-validation-with-parsing.rb +28 -0
  132. data/test/data/users-guide/howto-validation.rb +25 -0
  133. data/test/data/users-guide/howto3.rb +6 -0
  134. data/test/data/users-guide/howto3.result +5 -0
  135. data/test/data/users-guide/howto3.yaml +8 -0
  136. data/test/data/users-guide/howto5_databinding.result +111 -0
  137. data/test/data/users-guide/invalid01.result +3 -0
  138. data/test/data/users-guide/invalid02.result +5 -0
  139. data/test/data/users-guide/invalid03.result +5 -0
  140. data/test/data/users-guide/invalid04.result +4 -0
  141. data/test/data/users-guide/invalid05.result +11 -0
  142. data/test/data/users-guide/invalid06.result +4 -0
  143. data/test/data/users-guide/invalid07.result +3 -0
  144. data/test/data/users-guide/invalid08.result +3 -0
  145. data/test/data/users-guide/invalid12.json +8 -0
  146. data/test/data/users-guide/invalid14.result +4 -0
  147. data/test/data/users-guide/invalid15.result +4 -0
  148. data/test/data/users-guide/loadbabel.rb +27 -0
  149. data/test/data/users-guide/loadconfig.rb +15 -0
  150. data/test/data/users-guide/loadconfig.result +2 -0
  151. data/test/data/users-guide/models.rb +22 -0
  152. data/test/data/users-guide/option_ha.result +6 -0
  153. data/test/data/users-guide/option_ha_genclass_java.result +7 -0
  154. data/test/{tmp.dir/meta1.schema → data/users-guide/schema01.yaml} +0 -0
  155. data/test/data/users-guide/schema02.yaml +12 -0
  156. data/test/data/users-guide/schema03.yaml +9 -0
  157. data/test/data/users-guide/schema04.yaml +20 -0
  158. data/test/data/users-guide/schema05.yaml +29 -0
  159. data/test/data/users-guide/schema06.yaml +11 -0
  160. data/test/data/users-guide/schema12.json +12 -0
  161. data/test/data/users-guide/schema13.yaml +13 -0
  162. data/test/data/users-guide/schema14.yaml +5 -0
  163. data/test/data/users-guide/schema15.yaml +21 -0
  164. data/test/data/users-guide/valid01.result +2 -0
  165. data/test/data/users-guide/valid02.result +2 -0
  166. data/test/data/users-guide/valid03.result +2 -0
  167. data/test/data/users-guide/valid04.result +2 -0
  168. data/test/data/users-guide/valid05.result +2 -0
  169. data/test/data/users-guide/valid06.result +2 -0
  170. data/test/data/users-guide/valid07.result +2 -0
  171. data/test/data/users-guide/valid08.result +2 -0
  172. data/test/data/users-guide/valid12.result +2 -0
  173. data/test/data/users-guide/valid13.result +2 -0
  174. data/test/data/users-guide/valid14.result +2 -0
  175. data/test/data/users-guide/valid15.result +2 -0
  176. data/test/data/users-guide/validate08.rb +37 -0
  177. data/test/test-action.rb +78 -0
  178. data/test/test-action.yaml +738 -0
  179. data/test/test-databinding.rb +80 -0
  180. data/test/test-databinding.yaml +301 -0
  181. data/test/test-main.rb +129 -150
  182. data/test/test-main.yaml +126 -321
  183. data/test/test-metavalidator.rb +47 -47
  184. data/test/test-metavalidator.yaml +77 -21
  185. data/test/test-parser-yaml.rb +57 -0
  186. data/test/test-parser-yaml.yaml +1749 -0
  187. data/test/test-rule.rb +14 -15
  188. data/test/test-rule.yaml +6 -3
  189. data/test/test-users-guide.rb +75 -0
  190. data/test/test-validator.rb +77 -52
  191. data/test/test-validator.yaml +168 -6
  192. data/test/test-yaml-parser.rb +47 -0
  193. data/test/{test-yamlparser.yaml → test-yaml-parser.yaml} +159 -52
  194. data/test/test.rb +37 -21
  195. metadata +136 -37
  196. data/COPYING +0 -340
  197. data/ChangeLog +0 -70
  198. data/doc-api/classes/YamlHelper.html +0 -259
  199. data/lib/kwalify/util/yaml-helper.rb +0 -82
  200. data/test/test-yamlparser.rb +0 -58
  201. data/test/tmp.dir/User.java +0 -43
  202. data/test/tmp.dir/action1.document +0 -18
  203. data/test/tmp.dir/action1.schema +0 -32
  204. data/test/tmp.dir/action2.document +0 -18
  205. data/test/tmp.dir/action2.schema +0 -32
  206. data/test/tmp.dir/emacs.document +0 -6
  207. data/test/tmp.dir/emacs.schema +0 -6
  208. data/test/tmp.dir/meta1.document +0 -0
  209. data/test/tmp.dir/meta2.document +0 -0
  210. data/test/tmp.dir/meta2.schema +0 -3
  211. data/test/tmp.dir/silent1.schema +0 -3
  212. data/test/tmp.dir/silent2.document +0 -7
  213. data/test/tmp.dir/silent2.schema +0 -3
  214. data/test/tmp.dir/stream.invalid +0 -8
  215. data/test/tmp.dir/stream.schema +0 -3
  216. data/test/tmp.dir/stream.valid +0 -8
  217. data/test/tmp.dir/untabify.document +0 -5
  218. data/test/tmp.dir/untabify.schema +0 -10
  219. data/todo.txt +0 -34
@@ -82,6 +82,13 @@
82
82
 
83
83
  <div id="description">
84
84
  <p>
85
+ (OBSOLETE) yaml parser
86
+ </p>
87
+ <p>
88
+ this class has been obsoleted. use <a
89
+ href="Yaml/Parser.html">Kwalify::Yaml::Parser</a> instead.
90
+ </p>
91
+ <p>
85
92
  ex.
86
93
  </p>
87
94
  <pre>
@@ -113,20 +120,20 @@ ex.
113
120
  <h3 class="section-bar">Methods</h3>
114
121
 
115
122
  <div class="name-list">
116
- <a href="#M000051">add_to_map</a>&nbsp;&nbsp;
117
- <a href="#M000048">add_to_seq</a>&nbsp;&nbsp;
118
- <a href="#M000050">create_mapping</a>&nbsp;&nbsp;
119
- <a href="#M000055">create_scalar</a>&nbsp;&nbsp;
120
- <a href="#M000047">create_sequence</a>&nbsp;&nbsp;
121
- <a href="#M000054">merge_map</a>&nbsp;&nbsp;
122
- <a href="#M000042">new</a>&nbsp;&nbsp;
123
- <a href="#M000043">parse</a>&nbsp;&nbsp;
124
- <a href="#M000044">path_linenum</a>&nbsp;&nbsp;
125
- <a href="#M000053">set_default</a>&nbsp;&nbsp;
126
- <a href="#M000046">set_error_linenums</a>&nbsp;&nbsp;
127
- <a href="#M000045">set_errors_linenum</a>&nbsp;&nbsp;
128
- <a href="#M000052">set_map_with</a>&nbsp;&nbsp;
129
- <a href="#M000049">set_seq_at</a>&nbsp;&nbsp;
123
+ <a href="#M000112">add_to_map</a>&nbsp;&nbsp;
124
+ <a href="#M000109">add_to_seq</a>&nbsp;&nbsp;
125
+ <a href="#M000111">create_mapping</a>&nbsp;&nbsp;
126
+ <a href="#M000116">create_scalar</a>&nbsp;&nbsp;
127
+ <a href="#M000108">create_sequence</a>&nbsp;&nbsp;
128
+ <a href="#M000115">merge_map</a>&nbsp;&nbsp;
129
+ <a href="#M000103">new</a>&nbsp;&nbsp;
130
+ <a href="#M000104">parse</a>&nbsp;&nbsp;
131
+ <a href="#M000105">path_linenum</a>&nbsp;&nbsp;
132
+ <a href="#M000114">set_default</a>&nbsp;&nbsp;
133
+ <a href="#M000107">set_error_linenums</a>&nbsp;&nbsp;
134
+ <a href="#M000106">set_errors_linenum</a>&nbsp;&nbsp;
135
+ <a href="#M000113">set_map_with</a>&nbsp;&nbsp;
136
+ <a href="#M000110">set_seq_at</a>&nbsp;&nbsp;
130
137
  </div>
131
138
  </div>
132
139
 
@@ -148,25 +155,25 @@ ex.
148
155
  <div id="methods">
149
156
  <h3 class="section-bar">Public Class methods</h3>
150
157
 
151
- <div id="method-M000042" class="method-detail">
152
- <a name="M000042"></a>
158
+ <div id="method-M000103" class="method-detail">
159
+ <a name="M000103"></a>
153
160
 
154
161
  <div class="method-heading">
155
- <a href="#M000042" class="method-signature">
162
+ <a href="#M000103" class="method-signature">
156
163
  <span class="method-name">new</span><span class="method-args">(*args)</span>
157
164
  </a>
158
165
  </div>
159
166
 
160
167
  <div class="method-description">
161
168
  <p><a class="source-toggle" href="#"
162
- onclick="toggleCode('M000042-source');return false;">[Source]</a></p>
163
- <div class="method-source-code" id="M000042-source">
169
+ onclick="toggleCode('M000103-source');return false;">[Source]</a></p>
170
+ <div class="method-source-code" id="M000103-source">
164
171
  <pre>
165
- <span class="ruby-comment cmt"># File kwalify/yaml-parser.rb, line 676</span>
166
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
167
- <span class="ruby-keyword kw">super</span>
168
- <span class="ruby-ivar">@linenums_table</span> = {} <span class="ruby-comment cmt"># object_id -&gt; hash or array</span>
169
- <span class="ruby-keyword kw">end</span>
172
+ <span class="ruby-comment cmt"># File kwalify/yaml-parser.rb, line 754</span>
173
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
174
+ <span class="ruby-keyword kw">super</span>
175
+ <span class="ruby-ivar">@linenums_table</span> = {} <span class="ruby-comment cmt"># object_id -&gt; hash or array</span>
176
+ <span class="ruby-keyword kw">end</span>
170
177
  </pre>
171
178
  </div>
172
179
  </div>
@@ -174,117 +181,117 @@ ex.
174
181
 
175
182
  <h3 class="section-bar">Public Instance methods</h3>
176
183
 
177
- <div id="method-M000043" class="method-detail">
178
- <a name="M000043"></a>
184
+ <div id="method-M000104" class="method-detail">
185
+ <a name="M000104"></a>
179
186
 
180
187
  <div class="method-heading">
181
- <a href="#M000043" class="method-signature">
188
+ <a href="#M000104" class="method-signature">
182
189
  <span class="method-name">parse</span><span class="method-args">()</span>
183
190
  </a>
184
191
  </div>
185
192
 
186
193
  <div class="method-description">
187
194
  <p><a class="source-toggle" href="#"
188
- onclick="toggleCode('M000043-source');return false;">[Source]</a></p>
189
- <div class="method-source-code" id="M000043-source">
195
+ onclick="toggleCode('M000104-source');return false;">[Source]</a></p>
196
+ <div class="method-source-code" id="M000104-source">
190
197
  <pre>
191
- <span class="ruby-comment cmt"># File kwalify/yaml-parser.rb, line 681</span>
192
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">parse</span>()
193
- <span class="ruby-ivar">@doc</span> = <span class="ruby-keyword kw">super</span>()
194
- <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@doc</span>
195
- <span class="ruby-keyword kw">end</span>
198
+ <span class="ruby-comment cmt"># File kwalify/yaml-parser.rb, line 759</span>
199
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">parse</span>()
200
+ <span class="ruby-ivar">@doc</span> = <span class="ruby-keyword kw">super</span>()
201
+ <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@doc</span>
202
+ <span class="ruby-keyword kw">end</span>
196
203
  </pre>
197
204
  </div>
198
205
  </div>
199
206
  </div>
200
207
 
201
- <div id="method-M000044" class="method-detail">
202
- <a name="M000044"></a>
208
+ <div id="method-M000105" class="method-detail">
209
+ <a name="M000105"></a>
203
210
 
204
211
  <div class="method-heading">
205
- <a href="#M000044" class="method-signature">
212
+ <a href="#M000105" class="method-signature">
206
213
  <span class="method-name">path_linenum</span><span class="method-args">(path)</span>
207
214
  </a>
208
215
  </div>
209
216
 
210
217
  <div class="method-description">
211
218
  <p><a class="source-toggle" href="#"
212
- onclick="toggleCode('M000044-source');return false;">[Source]</a></p>
213
- <div class="method-source-code" id="M000044-source">
219
+ onclick="toggleCode('M000105-source');return false;">[Source]</a></p>
220
+ <div class="method-source-code" id="M000105-source">
214
221
  <pre>
215
- <span class="ruby-comment cmt"># File kwalify/yaml-parser.rb, line 686</span>
216
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">path_linenum</span>(<span class="ruby-identifier">path</span>)
217
- <span class="ruby-keyword kw">return</span> <span class="ruby-value">1</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">path</span>.<span class="ruby-identifier">empty?</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">path</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'/'</span>
218
- <span class="ruby-identifier">elems</span> = <span class="ruby-identifier">path</span>.<span class="ruby-identifier">split</span>(<span class="ruby-value str">'/'</span>)
219
- <span class="ruby-identifier">elems</span>.<span class="ruby-identifier">shift</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">path</span>[<span class="ruby-value">0</span>] <span class="ruby-operator">==</span> <span class="ruby-value">?/</span> <span class="ruby-comment cmt"># delete empty string on head</span>
220
- <span class="ruby-identifier">last_elem</span> = <span class="ruby-identifier">elems</span>.<span class="ruby-identifier">pop</span>
221
- <span class="ruby-identifier">c</span> = <span class="ruby-ivar">@doc</span> <span class="ruby-comment cmt"># collection</span>
222
- <span class="ruby-identifier">elems</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">elem</span><span class="ruby-operator">|</span>
223
- <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Array</span>)
224
- <span class="ruby-identifier">c</span> = <span class="ruby-identifier">c</span>[<span class="ruby-identifier">elem</span>.<span class="ruby-identifier">to_i</span>]
225
- <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Hash</span>)
226
- <span class="ruby-identifier">c</span> = <span class="ruby-identifier">c</span>[<span class="ruby-identifier">elem</span>]
227
- <span class="ruby-keyword kw">else</span>
228
- <span class="ruby-identifier">assert</span> <span class="ruby-keyword kw">false</span>
229
- <span class="ruby-keyword kw">end</span>
230
- <span class="ruby-keyword kw">end</span>
231
- <span class="ruby-identifier">linenums</span> = <span class="ruby-ivar">@linenums_table</span>[<span class="ruby-identifier">c</span>.<span class="ruby-identifier">__id__</span>]
232
- <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Array</span>)
233
- <span class="ruby-identifier">linenum</span> = <span class="ruby-identifier">linenums</span>[<span class="ruby-identifier">last_elem</span>.<span class="ruby-identifier">to_i</span>]
234
- <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Hash</span>)
235
- <span class="ruby-identifier">linenum</span> = <span class="ruby-identifier">linenums</span>[<span class="ruby-identifier">last_elem</span>]
236
- <span class="ruby-keyword kw">end</span>
237
- <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">linenum</span>
222
+ <span class="ruby-comment cmt"># File kwalify/yaml-parser.rb, line 764</span>
223
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">path_linenum</span>(<span class="ruby-identifier">path</span>)
224
+ <span class="ruby-keyword kw">return</span> <span class="ruby-value">1</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">path</span>.<span class="ruby-identifier">empty?</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">path</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'/'</span>
225
+ <span class="ruby-identifier">elems</span> = <span class="ruby-identifier">path</span>.<span class="ruby-identifier">split</span>(<span class="ruby-value str">'/'</span>)
226
+ <span class="ruby-identifier">elems</span>.<span class="ruby-identifier">shift</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">path</span>[<span class="ruby-value">0</span>] <span class="ruby-operator">==</span> <span class="ruby-value">?/</span> <span class="ruby-comment cmt"># delete empty string on head</span>
227
+ <span class="ruby-identifier">last_elem</span> = <span class="ruby-identifier">elems</span>.<span class="ruby-identifier">pop</span>
228
+ <span class="ruby-identifier">c</span> = <span class="ruby-ivar">@doc</span> <span class="ruby-comment cmt"># collection</span>
229
+ <span class="ruby-identifier">elems</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">elem</span><span class="ruby-operator">|</span>
230
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Array</span>)
231
+ <span class="ruby-identifier">c</span> = <span class="ruby-identifier">c</span>[<span class="ruby-identifier">elem</span>.<span class="ruby-identifier">to_i</span>]
232
+ <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Hash</span>)
233
+ <span class="ruby-identifier">c</span> = <span class="ruby-identifier">c</span>[<span class="ruby-identifier">elem</span>]
234
+ <span class="ruby-keyword kw">else</span>
235
+ <span class="ruby-identifier">assert</span> <span class="ruby-keyword kw">false</span>
236
+ <span class="ruby-keyword kw">end</span>
238
237
  <span class="ruby-keyword kw">end</span>
238
+ <span class="ruby-identifier">linenums</span> = <span class="ruby-ivar">@linenums_table</span>[<span class="ruby-identifier">c</span>.<span class="ruby-identifier">__id__</span>]
239
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Array</span>)
240
+ <span class="ruby-identifier">linenum</span> = <span class="ruby-identifier">linenums</span>[<span class="ruby-identifier">last_elem</span>.<span class="ruby-identifier">to_i</span>]
241
+ <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Hash</span>)
242
+ <span class="ruby-identifier">linenum</span> = <span class="ruby-identifier">linenums</span>[<span class="ruby-identifier">last_elem</span>]
243
+ <span class="ruby-keyword kw">end</span>
244
+ <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">linenum</span>
245
+ <span class="ruby-keyword kw">end</span>
239
246
  </pre>
240
247
  </div>
241
248
  </div>
242
249
  </div>
243
250
 
244
- <div id="method-M000046" class="method-detail">
245
- <a name="M000046"></a>
251
+ <div id="method-M000107" class="method-detail">
252
+ <a name="M000107"></a>
246
253
 
247
254
  <div class="method-heading">
248
- <a href="#M000046" class="method-signature">
255
+ <a href="#M000107" class="method-signature">
249
256
  <span class="method-name">set_error_linenums</span><span class="method-args">(errors)</span>
250
257
  </a>
251
258
  </div>
252
259
 
253
260
  <div class="method-description">
254
261
  <p><a class="source-toggle" href="#"
255
- onclick="toggleCode('M000046-source');return false;">[Source]</a></p>
256
- <div class="method-source-code" id="M000046-source">
262
+ onclick="toggleCode('M000107-source');return false;">[Source]</a></p>
263
+ <div class="method-source-code" id="M000107-source">
257
264
  <pre>
258
- <span class="ruby-comment cmt"># File kwalify/yaml-parser.rb, line 716</span>
259
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">set_error_linenums</span>(<span class="ruby-identifier">errors</span>)
260
- <span class="ruby-identifier">$stderr</span>.<span class="ruby-identifier">puts</span> <span class="ruby-value str">&quot;*** Kwalify::YamlParser#set_error_linenums() is obsolete. You should use set_errors_linenum() instead.&quot;</span>
261
- <span class="ruby-identifier">set_errors_linenum</span>(<span class="ruby-identifier">errors</span>)
262
- <span class="ruby-keyword kw">end</span>
265
+ <span class="ruby-comment cmt"># File kwalify/yaml-parser.rb, line 794</span>
266
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">set_error_linenums</span>(<span class="ruby-identifier">errors</span>)
267
+ <span class="ruby-identifier">warn</span> <span class="ruby-value str">&quot;*** Kwalify::YamlParser#set_error_linenums() is obsolete. You should use set_errors_linenum() instead.&quot;</span>
268
+ <span class="ruby-identifier">set_errors_linenum</span>(<span class="ruby-identifier">errors</span>)
269
+ <span class="ruby-keyword kw">end</span>
263
270
  </pre>
264
271
  </div>
265
272
  </div>
266
273
  </div>
267
274
 
268
- <div id="method-M000045" class="method-detail">
269
- <a name="M000045"></a>
275
+ <div id="method-M000106" class="method-detail">
276
+ <a name="M000106"></a>
270
277
 
271
278
  <div class="method-heading">
272
- <a href="#M000045" class="method-signature">
279
+ <a href="#M000106" class="method-signature">
273
280
  <span class="method-name">set_errors_linenum</span><span class="method-args">(errors)</span>
274
281
  </a>
275
282
  </div>
276
283
 
277
284
  <div class="method-description">
278
285
  <p><a class="source-toggle" href="#"
279
- onclick="toggleCode('M000045-source');return false;">[Source]</a></p>
280
- <div class="method-source-code" id="M000045-source">
286
+ onclick="toggleCode('M000106-source');return false;">[Source]</a></p>
287
+ <div class="method-source-code" id="M000106-source">
281
288
  <pre>
282
- <span class="ruby-comment cmt"># File kwalify/yaml-parser.rb, line 710</span>
283
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">set_errors_linenum</span>(<span class="ruby-identifier">errors</span>)
284
- <span class="ruby-identifier">errors</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">error</span><span class="ruby-operator">|</span>
285
- <span class="ruby-identifier">error</span>.<span class="ruby-identifier">linenum</span> = <span class="ruby-identifier">path_linenum</span>(<span class="ruby-identifier">error</span>.<span class="ruby-identifier">path</span>)
286
- <span class="ruby-keyword kw">end</span>
289
+ <span class="ruby-comment cmt"># File kwalify/yaml-parser.rb, line 788</span>
290
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">set_errors_linenum</span>(<span class="ruby-identifier">errors</span>)
291
+ <span class="ruby-identifier">errors</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">error</span><span class="ruby-operator">|</span>
292
+ <span class="ruby-identifier">error</span>.<span class="ruby-identifier">linenum</span> = <span class="ruby-identifier">path_linenum</span>(<span class="ruby-identifier">error</span>.<span class="ruby-identifier">path</span>)
287
293
  <span class="ruby-keyword kw">end</span>
294
+ <span class="ruby-keyword kw">end</span>
288
295
  </pre>
289
296
  </div>
290
297
  </div>
@@ -292,229 +299,229 @@ ex.
292
299
 
293
300
  <h3 class="section-bar">Protected Instance methods</h3>
294
301
 
295
- <div id="method-M000051" class="method-detail">
296
- <a name="M000051"></a>
302
+ <div id="method-M000112" class="method-detail">
303
+ <a name="M000112"></a>
297
304
 
298
305
  <div class="method-heading">
299
- <a href="#M000051" class="method-signature">
306
+ <a href="#M000112" class="method-signature">
300
307
  <span class="method-name">add_to_map</span><span class="method-args">(map, key, value, linenum)</span>
301
308
  </a>
302
309
  </div>
303
310
 
304
311
  <div class="method-description">
305
312
  <p><a class="source-toggle" href="#"
306
- onclick="toggleCode('M000051-source');return false;">[Source]</a></p>
307
- <div class="method-source-code" id="M000051-source">
313
+ onclick="toggleCode('M000112-source');return false;">[Source]</a></p>
314
+ <div class="method-source-code" id="M000112-source">
308
315
  <pre>
309
- <span class="ruby-comment cmt"># File kwalify/yaml-parser.rb, line 745</span>
310
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_to_map</span>(<span class="ruby-identifier">map</span>, <span class="ruby-identifier">key</span>, <span class="ruby-identifier">value</span>, <span class="ruby-identifier">linenum</span>)
311
- <span class="ruby-identifier">map</span>[<span class="ruby-identifier">key</span>] = <span class="ruby-identifier">value</span>
312
- <span class="ruby-ivar">@linenums_table</span>[<span class="ruby-identifier">map</span>.<span class="ruby-identifier">__id__</span>][<span class="ruby-identifier">key</span>] = <span class="ruby-identifier">linenum</span>
313
- <span class="ruby-keyword kw">end</span>
316
+ <span class="ruby-comment cmt"># File kwalify/yaml-parser.rb, line 823</span>
317
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_to_map</span>(<span class="ruby-identifier">map</span>, <span class="ruby-identifier">key</span>, <span class="ruby-identifier">value</span>, <span class="ruby-identifier">linenum</span>)
318
+ <span class="ruby-identifier">map</span>[<span class="ruby-identifier">key</span>] = <span class="ruby-identifier">value</span>
319
+ <span class="ruby-ivar">@linenums_table</span>[<span class="ruby-identifier">map</span>.<span class="ruby-identifier">__id__</span>][<span class="ruby-identifier">key</span>] = <span class="ruby-identifier">linenum</span>
320
+ <span class="ruby-keyword kw">end</span>
314
321
  </pre>
315
322
  </div>
316
323
  </div>
317
324
  </div>
318
325
 
319
- <div id="method-M000048" class="method-detail">
320
- <a name="M000048"></a>
326
+ <div id="method-M000109" class="method-detail">
327
+ <a name="M000109"></a>
321
328
 
322
329
  <div class="method-heading">
323
- <a href="#M000048" class="method-signature">
330
+ <a href="#M000109" class="method-signature">
324
331
  <span class="method-name">add_to_seq</span><span class="method-args">(seq, value, linenum)</span>
325
332
  </a>
326
333
  </div>
327
334
 
328
335
  <div class="method-description">
329
336
  <p><a class="source-toggle" href="#"
330
- onclick="toggleCode('M000048-source');return false;">[Source]</a></p>
331
- <div class="method-source-code" id="M000048-source">
337
+ onclick="toggleCode('M000109-source');return false;">[Source]</a></p>
338
+ <div class="method-source-code" id="M000109-source">
332
339
  <pre>
333
- <span class="ruby-comment cmt"># File kwalify/yaml-parser.rb, line 729</span>
334
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_to_seq</span>(<span class="ruby-identifier">seq</span>, <span class="ruby-identifier">value</span>, <span class="ruby-identifier">linenum</span>)
335
- <span class="ruby-identifier">seq</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">value</span>
336
- <span class="ruby-ivar">@linenums_table</span>[<span class="ruby-identifier">seq</span>.<span class="ruby-identifier">__id__</span>] <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">linenum</span>
337
- <span class="ruby-keyword kw">end</span>
340
+ <span class="ruby-comment cmt"># File kwalify/yaml-parser.rb, line 807</span>
341
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_to_seq</span>(<span class="ruby-identifier">seq</span>, <span class="ruby-identifier">value</span>, <span class="ruby-identifier">linenum</span>)
342
+ <span class="ruby-identifier">seq</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">value</span>
343
+ <span class="ruby-ivar">@linenums_table</span>[<span class="ruby-identifier">seq</span>.<span class="ruby-identifier">__id__</span>] <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">linenum</span>
344
+ <span class="ruby-keyword kw">end</span>
338
345
  </pre>
339
346
  </div>
340
347
  </div>
341
348
  </div>
342
349
 
343
- <div id="method-M000050" class="method-detail">
344
- <a name="M000050"></a>
350
+ <div id="method-M000111" class="method-detail">
351
+ <a name="M000111"></a>
345
352
 
346
353
  <div class="method-heading">
347
- <a href="#M000050" class="method-signature">
354
+ <a href="#M000111" class="method-signature">
348
355
  <span class="method-name">create_mapping</span><span class="method-args">(linenum=current_linenum())</span>
349
356
  </a>
350
357
  </div>
351
358
 
352
359
  <div class="method-description">
353
360
  <p><a class="source-toggle" href="#"
354
- onclick="toggleCode('M000050-source');return false;">[Source]</a></p>
355
- <div class="method-source-code" id="M000050-source">
361
+ onclick="toggleCode('M000111-source');return false;">[Source]</a></p>
362
+ <div class="method-source-code" id="M000111-source">
356
363
  <pre>
357
- <span class="ruby-comment cmt"># File kwalify/yaml-parser.rb, line 739</span>
358
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">create_mapping</span>(<span class="ruby-identifier">linenum</span>=<span class="ruby-identifier">current_linenum</span>())
359
- <span class="ruby-identifier">map</span> = {}
360
- <span class="ruby-ivar">@linenums_table</span>[<span class="ruby-identifier">map</span>.<span class="ruby-identifier">__id__</span>] = {}
361
- <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">map</span>
362
- <span class="ruby-keyword kw">end</span>
364
+ <span class="ruby-comment cmt"># File kwalify/yaml-parser.rb, line 817</span>
365
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">create_mapping</span>(<span class="ruby-identifier">linenum</span>=<span class="ruby-identifier">current_linenum</span>())
366
+ <span class="ruby-identifier">map</span> = {}
367
+ <span class="ruby-ivar">@linenums_table</span>[<span class="ruby-identifier">map</span>.<span class="ruby-identifier">__id__</span>] = {}
368
+ <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">map</span>
369
+ <span class="ruby-keyword kw">end</span>
363
370
  </pre>
364
371
  </div>
365
372
  </div>
366
373
  </div>
367
374
 
368
- <div id="method-M000055" class="method-detail">
369
- <a name="M000055"></a>
375
+ <div id="method-M000116" class="method-detail">
376
+ <a name="M000116"></a>
370
377
 
371
378
  <div class="method-heading">
372
- <a href="#M000055" class="method-signature">
379
+ <a href="#M000116" class="method-signature">
373
380
  <span class="method-name">create_scalar</span><span class="method-args">(value, linenum=current_linenum())</span>
374
381
  </a>
375
382
  </div>
376
383
 
377
384
  <div class="method-description">
378
385
  <p><a class="source-toggle" href="#"
379
- onclick="toggleCode('M000055-source');return false;">[Source]</a></p>
380
- <div class="method-source-code" id="M000055-source">
386
+ onclick="toggleCode('M000116-source');return false;">[Source]</a></p>
387
+ <div class="method-source-code" id="M000116-source">
381
388
  <pre>
382
- <span class="ruby-comment cmt"># File kwalify/yaml-parser.rb, line 774</span>
383
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">create_scalar</span>(<span class="ruby-identifier">value</span>, <span class="ruby-identifier">linenum</span>=<span class="ruby-identifier">current_linenum</span>())
384
- <span class="ruby-identifier">data</span> = <span class="ruby-keyword kw">super</span>(<span class="ruby-identifier">value</span>)
385
- <span class="ruby-comment cmt">#return Scalar.new(data, linenum)</span>
386
- <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">data</span>
387
- <span class="ruby-keyword kw">end</span>
389
+ <span class="ruby-comment cmt"># File kwalify/yaml-parser.rb, line 852</span>
390
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">create_scalar</span>(<span class="ruby-identifier">value</span>, <span class="ruby-identifier">linenum</span>=<span class="ruby-identifier">current_linenum</span>())
391
+ <span class="ruby-identifier">data</span> = <span class="ruby-keyword kw">super</span>(<span class="ruby-identifier">value</span>)
392
+ <span class="ruby-comment cmt">#return Scalar.new(data, linenum)</span>
393
+ <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">data</span>
394
+ <span class="ruby-keyword kw">end</span>
388
395
  </pre>
389
396
  </div>
390
397
  </div>
391
398
  </div>
392
399
 
393
- <div id="method-M000047" class="method-detail">
394
- <a name="M000047"></a>
400
+ <div id="method-M000108" class="method-detail">
401
+ <a name="M000108"></a>
395
402
 
396
403
  <div class="method-heading">
397
- <a href="#M000047" class="method-signature">
404
+ <a href="#M000108" class="method-signature">
398
405
  <span class="method-name">create_sequence</span><span class="method-args">(linenum=current_linenum())</span>
399
406
  </a>
400
407
  </div>
401
408
 
402
409
  <div class="method-description">
403
410
  <p><a class="source-toggle" href="#"
404
- onclick="toggleCode('M000047-source');return false;">[Source]</a></p>
405
- <div class="method-source-code" id="M000047-source">
411
+ onclick="toggleCode('M000108-source');return false;">[Source]</a></p>
412
+ <div class="method-source-code" id="M000108-source">
406
413
  <pre>
407
- <span class="ruby-comment cmt"># File kwalify/yaml-parser.rb, line 723</span>
408
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">create_sequence</span>(<span class="ruby-identifier">linenum</span>=<span class="ruby-identifier">current_linenum</span>())
409
- <span class="ruby-identifier">seq</span> = []
410
- <span class="ruby-ivar">@linenums_table</span>[<span class="ruby-identifier">seq</span>.<span class="ruby-identifier">__id__</span>] = []
411
- <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">seq</span>
412
- <span class="ruby-keyword kw">end</span>
414
+ <span class="ruby-comment cmt"># File kwalify/yaml-parser.rb, line 801</span>
415
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">create_sequence</span>(<span class="ruby-identifier">linenum</span>=<span class="ruby-identifier">current_linenum</span>())
416
+ <span class="ruby-identifier">seq</span> = []
417
+ <span class="ruby-ivar">@linenums_table</span>[<span class="ruby-identifier">seq</span>.<span class="ruby-identifier">__id__</span>] = []
418
+ <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">seq</span>
419
+ <span class="ruby-keyword kw">end</span>
413
420
  </pre>
414
421
  </div>
415
422
  </div>
416
423
  </div>
417
424
 
418
- <div id="method-M000054" class="method-detail">
419
- <a name="M000054"></a>
425
+ <div id="method-M000115" class="method-detail">
426
+ <a name="M000115"></a>
420
427
 
421
428
  <div class="method-heading">
422
- <a href="#M000054" class="method-signature">
429
+ <a href="#M000115" class="method-signature">
423
430
  <span class="method-name">merge_map</span><span class="method-args">(map, collection, linenum)</span>
424
431
  </a>
425
432
  </div>
426
433
 
427
434
  <div class="method-description">
428
435
  <p><a class="source-toggle" href="#"
429
- onclick="toggleCode('M000054-source');return false;">[Source]</a></p>
430
- <div class="method-source-code" id="M000054-source">
436
+ onclick="toggleCode('M000115-source');return false;">[Source]</a></p>
437
+ <div class="method-source-code" id="M000115-source">
431
438
  <pre>
432
- <span class="ruby-comment cmt"># File kwalify/yaml-parser.rb, line 760</span>
433
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">merge_map</span>(<span class="ruby-identifier">map</span>, <span class="ruby-identifier">collection</span>, <span class="ruby-identifier">linenum</span>)
434
- <span class="ruby-identifier">t</span> = <span class="ruby-ivar">@linenums_table</span>[<span class="ruby-identifier">map</span>.<span class="ruby-identifier">__id__</span>]
435
- <span class="ruby-identifier">list</span> = <span class="ruby-identifier">collection</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Array</span>) <span class="ruby-operator">?</span> <span class="ruby-identifier">collection</span> <span class="ruby-operator">:</span> [ <span class="ruby-identifier">collection</span> ]
436
- <span class="ruby-identifier">list</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">m</span><span class="ruby-operator">|</span>
437
- <span class="ruby-identifier">t2</span> = <span class="ruby-ivar">@linenums_table</span>[<span class="ruby-identifier">m</span>.<span class="ruby-identifier">__id__</span>]
438
- <span class="ruby-identifier">m</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-identifier">val</span><span class="ruby-operator">|</span>
439
- <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">map</span>.<span class="ruby-identifier">key?</span>(<span class="ruby-identifier">key</span>)
440
- <span class="ruby-identifier">map</span>[<span class="ruby-identifier">key</span>] = <span class="ruby-identifier">val</span>
441
- <span class="ruby-identifier">t</span>[<span class="ruby-identifier">key</span>] = <span class="ruby-identifier">t2</span>[<span class="ruby-identifier">key</span>]
442
- <span class="ruby-keyword kw">end</span>
443
- <span class="ruby-keyword kw">end</span>
444
- <span class="ruby-keyword kw">end</span>
439
+ <span class="ruby-comment cmt"># File kwalify/yaml-parser.rb, line 838</span>
440
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">merge_map</span>(<span class="ruby-identifier">map</span>, <span class="ruby-identifier">collection</span>, <span class="ruby-identifier">linenum</span>)
441
+ <span class="ruby-identifier">t</span> = <span class="ruby-ivar">@linenums_table</span>[<span class="ruby-identifier">map</span>.<span class="ruby-identifier">__id__</span>]
442
+ <span class="ruby-identifier">list</span> = <span class="ruby-identifier">collection</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Array</span>) <span class="ruby-operator">?</span> <span class="ruby-identifier">collection</span> <span class="ruby-operator">:</span> [ <span class="ruby-identifier">collection</span> ]
443
+ <span class="ruby-identifier">list</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">m</span><span class="ruby-operator">|</span>
444
+ <span class="ruby-identifier">t2</span> = <span class="ruby-ivar">@linenums_table</span>[<span class="ruby-identifier">m</span>.<span class="ruby-identifier">__id__</span>]
445
+ <span class="ruby-identifier">m</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-identifier">val</span><span class="ruby-operator">|</span>
446
+ <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">map</span>.<span class="ruby-identifier">key?</span>(<span class="ruby-identifier">key</span>)
447
+ <span class="ruby-identifier">map</span>[<span class="ruby-identifier">key</span>] = <span class="ruby-identifier">val</span>
448
+ <span class="ruby-identifier">t</span>[<span class="ruby-identifier">key</span>] = <span class="ruby-identifier">t2</span>[<span class="ruby-identifier">key</span>]
449
+ <span class="ruby-keyword kw">end</span>
450
+ <span class="ruby-keyword kw">end</span>
445
451
  <span class="ruby-keyword kw">end</span>
452
+ <span class="ruby-keyword kw">end</span>
446
453
  </pre>
447
454
  </div>
448
455
  </div>
449
456
  </div>
450
457
 
451
- <div id="method-M000053" class="method-detail">
452
- <a name="M000053"></a>
458
+ <div id="method-M000114" class="method-detail">
459
+ <a name="M000114"></a>
453
460
 
454
461
  <div class="method-heading">
455
- <a href="#M000053" class="method-signature">
462
+ <a href="#M000114" class="method-signature">
456
463
  <span class="method-name">set_default</span><span class="method-args">(map, value, linenum)</span>
457
464
  </a>
458
465
  </div>
459
466
 
460
467
  <div class="method-description">
461
468
  <p><a class="source-toggle" href="#"
462
- onclick="toggleCode('M000053-source');return false;">[Source]</a></p>
463
- <div class="method-source-code" id="M000053-source">
469
+ onclick="toggleCode('M000114-source');return false;">[Source]</a></p>
470
+ <div class="method-source-code" id="M000114-source">
464
471
  <pre>
465
- <span class="ruby-comment cmt"># File kwalify/yaml-parser.rb, line 755</span>
466
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">set_default</span>(<span class="ruby-identifier">map</span>, <span class="ruby-identifier">value</span>, <span class="ruby-identifier">linenum</span>)
467
- <span class="ruby-identifier">map</span>.<span class="ruby-identifier">default</span> = <span class="ruby-identifier">value</span>
468
- <span class="ruby-ivar">@linenums_table</span>[<span class="ruby-identifier">map</span>.<span class="ruby-identifier">__id__</span>][<span class="ruby-value str">'='</span><span class="ruby-value str">'='</span>] = <span class="ruby-identifier">linenum</span>
469
- <span class="ruby-keyword kw">end</span>
472
+ <span class="ruby-comment cmt"># File kwalify/yaml-parser.rb, line 833</span>
473
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">set_default</span>(<span class="ruby-identifier">map</span>, <span class="ruby-identifier">value</span>, <span class="ruby-identifier">linenum</span>)
474
+ <span class="ruby-identifier">map</span>.<span class="ruby-identifier">default</span> = <span class="ruby-identifier">value</span>
475
+ <span class="ruby-ivar">@linenums_table</span>[<span class="ruby-identifier">map</span>.<span class="ruby-identifier">__id__</span>][<span class="ruby-value str">'='</span><span class="ruby-value str">'='</span>] = <span class="ruby-identifier">linenum</span>
476
+ <span class="ruby-keyword kw">end</span>
470
477
  </pre>
471
478
  </div>
472
479
  </div>
473
480
  </div>
474
481
 
475
- <div id="method-M000052" class="method-detail">
476
- <a name="M000052"></a>
482
+ <div id="method-M000113" class="method-detail">
483
+ <a name="M000113"></a>
477
484
 
478
485
  <div class="method-heading">
479
- <a href="#M000052" class="method-signature">
486
+ <a href="#M000113" class="method-signature">
480
487
  <span class="method-name">set_map_with</span><span class="method-args">(map, key, value, linenum)</span>
481
488
  </a>
482
489
  </div>
483
490
 
484
491
  <div class="method-description">
485
492
  <p><a class="source-toggle" href="#"
486
- onclick="toggleCode('M000052-source');return false;">[Source]</a></p>
487
- <div class="method-source-code" id="M000052-source">
493
+ onclick="toggleCode('M000113-source');return false;">[Source]</a></p>
494
+ <div class="method-source-code" id="M000113-source">
488
495
  <pre>
489
- <span class="ruby-comment cmt"># File kwalify/yaml-parser.rb, line 750</span>
490
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">set_map_with</span>(<span class="ruby-identifier">map</span>, <span class="ruby-identifier">key</span>, <span class="ruby-identifier">value</span>, <span class="ruby-identifier">linenum</span>)
491
- <span class="ruby-identifier">map</span>[<span class="ruby-identifier">key</span>] = <span class="ruby-identifier">value</span>
492
- <span class="ruby-ivar">@linenums_table</span>[<span class="ruby-identifier">map</span>.<span class="ruby-identifier">__id__</span>][<span class="ruby-identifier">key</span>] = <span class="ruby-identifier">linenum</span>
493
- <span class="ruby-keyword kw">end</span>
496
+ <span class="ruby-comment cmt"># File kwalify/yaml-parser.rb, line 828</span>
497
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">set_map_with</span>(<span class="ruby-identifier">map</span>, <span class="ruby-identifier">key</span>, <span class="ruby-identifier">value</span>, <span class="ruby-identifier">linenum</span>)
498
+ <span class="ruby-identifier">map</span>[<span class="ruby-identifier">key</span>] = <span class="ruby-identifier">value</span>
499
+ <span class="ruby-ivar">@linenums_table</span>[<span class="ruby-identifier">map</span>.<span class="ruby-identifier">__id__</span>][<span class="ruby-identifier">key</span>] = <span class="ruby-identifier">linenum</span>
500
+ <span class="ruby-keyword kw">end</span>
494
501
  </pre>
495
502
  </div>
496
503
  </div>
497
504
  </div>
498
505
 
499
- <div id="method-M000049" class="method-detail">
500
- <a name="M000049"></a>
506
+ <div id="method-M000110" class="method-detail">
507
+ <a name="M000110"></a>
501
508
 
502
509
  <div class="method-heading">
503
- <a href="#M000049" class="method-signature">
510
+ <a href="#M000110" class="method-signature">
504
511
  <span class="method-name">set_seq_at</span><span class="method-args">(seq, i, value, linenum)</span>
505
512
  </a>
506
513
  </div>
507
514
 
508
515
  <div class="method-description">
509
516
  <p><a class="source-toggle" href="#"
510
- onclick="toggleCode('M000049-source');return false;">[Source]</a></p>
511
- <div class="method-source-code" id="M000049-source">
517
+ onclick="toggleCode('M000110-source');return false;">[Source]</a></p>
518
+ <div class="method-source-code" id="M000110-source">
512
519
  <pre>
513
- <span class="ruby-comment cmt"># File kwalify/yaml-parser.rb, line 734</span>
514
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">set_seq_at</span>(<span class="ruby-identifier">seq</span>, <span class="ruby-identifier">i</span>, <span class="ruby-identifier">value</span>, <span class="ruby-identifier">linenum</span>)
515
- <span class="ruby-identifier">seq</span>[<span class="ruby-identifier">i</span>] = <span class="ruby-identifier">value</span>
516
- <span class="ruby-ivar">@linenums_table</span>[<span class="ruby-identifier">seq</span>.<span class="ruby-identifier">__id__</span>][<span class="ruby-identifier">i</span>] = <span class="ruby-identifier">linenum</span>
517
- <span class="ruby-keyword kw">end</span>
520
+ <span class="ruby-comment cmt"># File kwalify/yaml-parser.rb, line 812</span>
521
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">set_seq_at</span>(<span class="ruby-identifier">seq</span>, <span class="ruby-identifier">i</span>, <span class="ruby-identifier">value</span>, <span class="ruby-identifier">linenum</span>)
522
+ <span class="ruby-identifier">seq</span>[<span class="ruby-identifier">i</span>] = <span class="ruby-identifier">value</span>
523
+ <span class="ruby-ivar">@linenums_table</span>[<span class="ruby-identifier">seq</span>.<span class="ruby-identifier">__id__</span>][<span class="ruby-identifier">i</span>] = <span class="ruby-identifier">linenum</span>
524
+ <span class="ruby-keyword kw">end</span>
518
525
  </pre>
519
526
  </div>
520
527
  </div>