kwalify 0.6.1 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES.txt +232 -0
- data/MIT-LICENSE +20 -0
- data/README.txt +16 -19
- data/bin/kwalify +3 -3
- data/contrib/inline-require +6 -4
- data/contrib/kwalify +3719 -2427
- data/doc-api/classes/CommandOptionError.html +17 -17
- data/doc-api/classes/CommandOptionParser.html +63 -63
- data/doc-api/classes/Kwalify.html +29 -7
- data/doc-api/classes/Kwalify/AssertionError.html +9 -9
- data/doc-api/classes/Kwalify/BaseError.html +72 -71
- data/doc-api/classes/Kwalify/BaseParser.html +461 -0
- data/doc-api/classes/Kwalify/CommandOptionError.html +11 -11
- data/doc-api/classes/Kwalify/ErrorHelper.html +51 -46
- data/doc-api/classes/Kwalify/HashInterface.html +13 -135
- data/doc-api/classes/Kwalify/Json.html +105 -0
- data/doc-api/classes/Kwalify/Main.html +129 -126
- data/doc-api/classes/Kwalify/MetaValidator.html +248 -232
- data/doc-api/classes/Kwalify/Parser.html +12 -12
- data/doc-api/classes/Kwalify/PlainYamlParser.html +166 -163
- data/doc-api/classes/Kwalify/PlainYamlParser/Alias.html +11 -11
- data/doc-api/classes/Kwalify/Rule.html +152 -130
- data/doc-api/classes/Kwalify/SchemaError.html +10 -10
- data/doc-api/classes/Kwalify/SyntaxError.html +185 -0
- data/doc-api/classes/Kwalify/Types.html +26 -25
- data/doc-api/classes/Kwalify/Util.html +389 -0
- data/doc-api/classes/Kwalify/Util/HashLike.html +246 -0
- data/doc-api/classes/Kwalify/Util/OrderedHash.html +330 -0
- data/doc-api/classes/Kwalify/ValidationError.html +10 -10
- data/doc-api/classes/Kwalify/Validator.html +153 -86
- data/doc-api/classes/Kwalify/Yaml.html +181 -0
- data/doc-api/classes/Kwalify/Yaml/Parser.html +1538 -0
- data/doc-api/classes/Kwalify/YamlParser.html +190 -183
- data/doc-api/classes/Kwalify/YamlSyntaxError.html +8 -57
- data/doc-api/created.rid +1 -1
- data/doc-api/files/__/README_txt.html +17 -22
- data/doc-api/files/kwalify/errors_rb.html +2 -2
- data/doc-api/files/kwalify/main_rb.html +4 -3
- data/doc-api/files/kwalify/messages_rb.html +2 -2
- data/doc-api/files/kwalify/meta-validator_rb.html +3 -3
- data/doc-api/files/kwalify/{util/yaml-helper_rb.html → parser/base_rb.html} +8 -6
- data/doc-api/files/kwalify/parser/yaml_rb.html +117 -0
- data/doc-api/files/kwalify/rule_rb.html +2 -2
- data/doc-api/files/kwalify/types_rb.html +2 -2
- data/doc-api/files/kwalify/util/assert-text-equal_rb.html +2 -2
- data/doc-api/files/kwalify/util/hash-interface_rb.html +9 -2
- data/doc-api/files/kwalify/util/hashlike_rb.html +107 -0
- data/doc-api/files/kwalify/util/option-parser_rb.html +2 -2
- data/doc-api/files/kwalify/util/ordered-hash_rb.html +107 -0
- data/doc-api/files/kwalify/util/testcase-helper_rb.html +2 -2
- data/doc-api/files/kwalify/util_rb.html +107 -0
- data/doc-api/files/kwalify/validator_rb.html +2 -2
- data/doc-api/files/kwalify/yaml-parser_rb.html +2 -2
- data/doc-api/files/kwalify_rb.html +3 -2
- data/doc-api/fr_class_index.html +8 -1
- data/doc-api/fr_file_index.html +5 -1
- data/doc-api/fr_method_index.html +128 -69
- data/doc/img/fig01.png +0 -0
- data/doc/users-guide.html +882 -717
- data/examples/address-book/address-book.schema.yaml +2 -2
- data/examples/data-binding/BABEL.data.yaml +63 -0
- data/examples/data-binding/BABEL.schema.yaml +31 -0
- data/examples/data-binding/Makefile +8 -0
- data/examples/data-binding/Rakefile +13 -0
- data/examples/data-binding/main.rb +27 -0
- data/examples/invoice/invoice.schema.yaml +3 -3
- data/examples/tapkit/tapkit.schema.yaml +2 -2
- data/lib/kwalify.rb +41 -4
- data/lib/kwalify/errors.rb +118 -96
- data/lib/kwalify/kwalify.schema.yaml +58 -0
- data/lib/kwalify/main.rb +384 -377
- data/lib/kwalify/messages.rb +41 -27
- data/lib/kwalify/meta-validator.rb +251 -331
- data/lib/kwalify/parser/base.rb +127 -0
- data/lib/kwalify/parser/yaml.rb +837 -0
- data/lib/kwalify/rule.rb +545 -487
- data/lib/kwalify/templates/genclass-java.eruby +189 -162
- data/lib/kwalify/templates/genclass-php.eruby +104 -0
- data/lib/kwalify/templates/genclass-ruby.eruby +95 -66
- data/lib/kwalify/types.rb +107 -106
- data/lib/kwalify/util.rb +157 -0
- data/lib/kwalify/util/assert-text-equal.rb +33 -31
- data/lib/kwalify/util/hash-interface.rb +11 -30
- data/lib/kwalify/util/hashlike.rb +51 -0
- data/lib/kwalify/util/option-parser.rb +144 -144
- data/lib/kwalify/util/ordered-hash.rb +57 -0
- data/lib/kwalify/util/testcase-helper.rb +3 -3
- data/lib/kwalify/validator.rb +267 -212
- data/lib/kwalify/yaml-parser.rb +822 -768
- data/setup.rb +861 -607
- data/test/Rookbook.yaml +10 -0
- data/test/{tmp.dir/Context.java → data/users-guide/AddressBook.java.expected} +11 -11
- data/test/data/users-guide/BABEL.data.yaml +24 -0
- data/test/data/users-guide/BABEL.schema.yaml +30 -0
- data/test/data/users-guide/ExampleAddressBook.java +47 -0
- data/test/{tmp.dir/Group.java → data/users-guide/Group.java.expected} +2 -11
- data/test/data/users-guide/Person.java.expected +44 -0
- data/test/data/users-guide/address_book.rb +52 -0
- data/test/data/users-guide/address_book.schema.yaml +28 -0
- data/test/data/users-guide/address_book.yaml +27 -0
- data/test/data/users-guide/answers-schema.yaml +12 -0
- data/test/data/users-guide/answers-validator.rb +52 -0
- data/test/data/users-guide/babel_genclass.result +26 -0
- data/test/data/users-guide/config.schema.yaml +7 -0
- data/test/data/users-guide/config.yaml +4 -0
- data/test/{tmp.dir/silent1.document → data/users-guide/document01a.yaml} +0 -0
- data/test/data/users-guide/document01b.yaml +3 -0
- data/test/data/users-guide/document02a.yaml +4 -0
- data/test/data/users-guide/document02b.yaml +4 -0
- data/test/data/users-guide/document03a.yaml +6 -0
- data/test/data/users-guide/document03b.yaml +6 -0
- data/test/data/users-guide/document04a.yaml +9 -0
- data/test/data/users-guide/document04b.yaml +9 -0
- data/test/data/users-guide/document05a.yaml +11 -0
- data/test/data/users-guide/document05b.yaml +12 -0
- data/test/data/users-guide/document06a.yaml +15 -0
- data/test/data/users-guide/document06b.yaml +16 -0
- data/test/data/users-guide/document07a.yaml +9 -0
- data/test/data/users-guide/document07b.yaml +7 -0
- data/test/data/users-guide/document12a.json +10 -0
- data/test/data/users-guide/document12b.json +6 -0
- data/test/data/users-guide/document13a.yaml +17 -0
- data/test/data/users-guide/document14a.yaml +3 -0
- data/test/data/users-guide/document14b.yaml +3 -0
- data/test/data/users-guide/document15a.yaml +6 -0
- data/test/data/users-guide/document15b.yaml +5 -0
- data/test/data/users-guide/example_address_book.rb +10 -0
- data/test/data/users-guide/example_address_book_java.result +32 -0
- data/test/data/users-guide/example_address_book_ruby.result +31 -0
- data/test/data/users-guide/genclass_java.result +4 -0
- data/test/data/users-guide/howto-validation-with-parsing.rb +28 -0
- data/test/data/users-guide/howto-validation.rb +25 -0
- data/test/data/users-guide/howto3.rb +6 -0
- data/test/data/users-guide/howto3.result +5 -0
- data/test/data/users-guide/howto3.yaml +8 -0
- data/test/data/users-guide/howto5_databinding.result +111 -0
- data/test/data/users-guide/invalid01.result +3 -0
- data/test/data/users-guide/invalid02.result +5 -0
- data/test/data/users-guide/invalid03.result +5 -0
- data/test/data/users-guide/invalid04.result +4 -0
- data/test/data/users-guide/invalid05.result +11 -0
- data/test/data/users-guide/invalid06.result +4 -0
- data/test/data/users-guide/invalid07.result +3 -0
- data/test/data/users-guide/invalid08.result +3 -0
- data/test/data/users-guide/invalid12.json +8 -0
- data/test/data/users-guide/invalid14.result +4 -0
- data/test/data/users-guide/invalid15.result +4 -0
- data/test/data/users-guide/loadbabel.rb +27 -0
- data/test/data/users-guide/loadconfig.rb +15 -0
- data/test/data/users-guide/loadconfig.result +2 -0
- data/test/data/users-guide/models.rb +22 -0
- data/test/data/users-guide/option_ha.result +6 -0
- data/test/data/users-guide/option_ha_genclass_java.result +7 -0
- data/test/{tmp.dir/meta1.schema → data/users-guide/schema01.yaml} +0 -0
- data/test/data/users-guide/schema02.yaml +12 -0
- data/test/data/users-guide/schema03.yaml +9 -0
- data/test/data/users-guide/schema04.yaml +20 -0
- data/test/data/users-guide/schema05.yaml +29 -0
- data/test/data/users-guide/schema06.yaml +11 -0
- data/test/data/users-guide/schema12.json +12 -0
- data/test/data/users-guide/schema13.yaml +13 -0
- data/test/data/users-guide/schema14.yaml +5 -0
- data/test/data/users-guide/schema15.yaml +21 -0
- data/test/data/users-guide/valid01.result +2 -0
- data/test/data/users-guide/valid02.result +2 -0
- data/test/data/users-guide/valid03.result +2 -0
- data/test/data/users-guide/valid04.result +2 -0
- data/test/data/users-guide/valid05.result +2 -0
- data/test/data/users-guide/valid06.result +2 -0
- data/test/data/users-guide/valid07.result +2 -0
- data/test/data/users-guide/valid08.result +2 -0
- data/test/data/users-guide/valid12.result +2 -0
- data/test/data/users-guide/valid13.result +2 -0
- data/test/data/users-guide/valid14.result +2 -0
- data/test/data/users-guide/valid15.result +2 -0
- data/test/data/users-guide/validate08.rb +37 -0
- data/test/test-action.rb +78 -0
- data/test/test-action.yaml +738 -0
- data/test/test-databinding.rb +80 -0
- data/test/test-databinding.yaml +301 -0
- data/test/test-main.rb +129 -150
- data/test/test-main.yaml +126 -321
- data/test/test-metavalidator.rb +47 -47
- data/test/test-metavalidator.yaml +77 -21
- data/test/test-parser-yaml.rb +57 -0
- data/test/test-parser-yaml.yaml +1749 -0
- data/test/test-rule.rb +14 -15
- data/test/test-rule.yaml +6 -3
- data/test/test-users-guide.rb +75 -0
- data/test/test-validator.rb +77 -52
- data/test/test-validator.yaml +168 -6
- data/test/test-yaml-parser.rb +47 -0
- data/test/{test-yamlparser.yaml → test-yaml-parser.yaml} +159 -52
- data/test/test.rb +37 -21
- metadata +136 -37
- data/COPYING +0 -340
- data/ChangeLog +0 -70
- data/doc-api/classes/YamlHelper.html +0 -259
- data/lib/kwalify/util/yaml-helper.rb +0 -82
- data/test/test-yamlparser.rb +0 -58
- data/test/tmp.dir/User.java +0 -43
- data/test/tmp.dir/action1.document +0 -18
- data/test/tmp.dir/action1.schema +0 -32
- data/test/tmp.dir/action2.document +0 -18
- data/test/tmp.dir/action2.schema +0 -32
- data/test/tmp.dir/emacs.document +0 -6
- data/test/tmp.dir/emacs.schema +0 -6
- data/test/tmp.dir/meta1.document +0 -0
- data/test/tmp.dir/meta2.document +0 -0
- data/test/tmp.dir/meta2.schema +0 -3
- data/test/tmp.dir/silent1.schema +0 -3
- data/test/tmp.dir/silent2.document +0 -7
- data/test/tmp.dir/silent2.schema +0 -3
- data/test/tmp.dir/stream.invalid +0 -8
- data/test/tmp.dir/stream.schema +0 -3
- data/test/tmp.dir/stream.valid +0 -8
- data/test/tmp.dir/untabify.document +0 -5
- data/test/tmp.dir/untabify.schema +0 -10
- 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="#
|
117
|
-
<a href="#
|
118
|
-
<a href="#
|
119
|
-
<a href="#
|
120
|
-
<a href="#
|
121
|
-
<a href="#
|
122
|
-
<a href="#
|
123
|
-
<a href="#
|
124
|
-
<a href="#
|
125
|
-
<a href="#
|
126
|
-
<a href="#
|
127
|
-
<a href="#
|
128
|
-
<a href="#
|
129
|
-
<a href="#
|
123
|
+
<a href="#M000112">add_to_map</a>
|
124
|
+
<a href="#M000109">add_to_seq</a>
|
125
|
+
<a href="#M000111">create_mapping</a>
|
126
|
+
<a href="#M000116">create_scalar</a>
|
127
|
+
<a href="#M000108">create_sequence</a>
|
128
|
+
<a href="#M000115">merge_map</a>
|
129
|
+
<a href="#M000103">new</a>
|
130
|
+
<a href="#M000104">parse</a>
|
131
|
+
<a href="#M000105">path_linenum</a>
|
132
|
+
<a href="#M000114">set_default</a>
|
133
|
+
<a href="#M000107">set_error_linenums</a>
|
134
|
+
<a href="#M000106">set_errors_linenum</a>
|
135
|
+
<a href="#M000113">set_map_with</a>
|
136
|
+
<a href="#M000110">set_seq_at</a>
|
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-
|
152
|
-
<a name="
|
158
|
+
<div id="method-M000103" class="method-detail">
|
159
|
+
<a name="M000103"></a>
|
153
160
|
|
154
161
|
<div class="method-heading">
|
155
|
-
<a href="#
|
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('
|
163
|
-
<div class="method-source-code" id="
|
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
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
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 -> 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-
|
178
|
-
<a name="
|
184
|
+
<div id="method-M000104" class="method-detail">
|
185
|
+
<a name="M000104"></a>
|
179
186
|
|
180
187
|
<div class="method-heading">
|
181
|
-
<a href="#
|
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('
|
189
|
-
<div class="method-source-code" id="
|
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
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
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-
|
202
|
-
<a name="
|
208
|
+
<div id="method-M000105" class="method-detail">
|
209
|
+
<a name="M000105"></a>
|
203
210
|
|
204
211
|
<div class="method-heading">
|
205
|
-
<a href="#
|
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('
|
213
|
-
<div class="method-source-code" id="
|
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
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
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-
|
245
|
-
<a name="
|
251
|
+
<div id="method-M000107" class="method-detail">
|
252
|
+
<a name="M000107"></a>
|
246
253
|
|
247
254
|
<div class="method-heading">
|
248
|
-
<a href="#
|
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('
|
256
|
-
<div class="method-source-code" id="
|
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
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
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">"*** Kwalify::YamlParser#set_error_linenums() is obsolete. You should use set_errors_linenum() instead."</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-
|
269
|
-
<a name="
|
275
|
+
<div id="method-M000106" class="method-detail">
|
276
|
+
<a name="M000106"></a>
|
270
277
|
|
271
278
|
<div class="method-heading">
|
272
|
-
<a href="#
|
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('
|
280
|
-
<div class="method-source-code" id="
|
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
|
283
|
-
|
284
|
-
|
285
|
-
|
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-
|
296
|
-
<a name="
|
302
|
+
<div id="method-M000112" class="method-detail">
|
303
|
+
<a name="M000112"></a>
|
297
304
|
|
298
305
|
<div class="method-heading">
|
299
|
-
<a href="#
|
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('
|
307
|
-
<div class="method-source-code" id="
|
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
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
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-
|
320
|
-
<a name="
|
326
|
+
<div id="method-M000109" class="method-detail">
|
327
|
+
<a name="M000109"></a>
|
321
328
|
|
322
329
|
<div class="method-heading">
|
323
|
-
<a href="#
|
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('
|
331
|
-
<div class="method-source-code" id="
|
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
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
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"><<</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"><<</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-
|
344
|
-
<a name="
|
350
|
+
<div id="method-M000111" class="method-detail">
|
351
|
+
<a name="M000111"></a>
|
345
352
|
|
346
353
|
<div class="method-heading">
|
347
|
-
<a href="#
|
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('
|
355
|
-
<div class="method-source-code" id="
|
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
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
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-
|
369
|
-
<a name="
|
375
|
+
<div id="method-M000116" class="method-detail">
|
376
|
+
<a name="M000116"></a>
|
370
377
|
|
371
378
|
<div class="method-heading">
|
372
|
-
<a href="#
|
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('
|
380
|
-
<div class="method-source-code" id="
|
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
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
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-
|
394
|
-
<a name="
|
400
|
+
<div id="method-M000108" class="method-detail">
|
401
|
+
<a name="M000108"></a>
|
395
402
|
|
396
403
|
<div class="method-heading">
|
397
|
-
<a href="#
|
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('
|
405
|
-
<div class="method-source-code" id="
|
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
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
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-
|
419
|
-
<a name="
|
425
|
+
<div id="method-M000115" class="method-detail">
|
426
|
+
<a name="M000115"></a>
|
420
427
|
|
421
428
|
<div class="method-heading">
|
422
|
-
<a href="#
|
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('
|
430
|
-
<div class="method-source-code" id="
|
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
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
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-
|
452
|
-
<a name="
|
458
|
+
<div id="method-M000114" class="method-detail">
|
459
|
+
<a name="M000114"></a>
|
453
460
|
|
454
461
|
<div class="method-heading">
|
455
|
-
<a href="#
|
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('
|
463
|
-
<div class="method-source-code" id="
|
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
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
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-
|
476
|
-
<a name="
|
482
|
+
<div id="method-M000113" class="method-detail">
|
483
|
+
<a name="M000113"></a>
|
477
484
|
|
478
485
|
<div class="method-heading">
|
479
|
-
<a href="#
|
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('
|
487
|
-
<div class="method-source-code" id="
|
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
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
|
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-
|
500
|
-
<a name="
|
506
|
+
<div id="method-M000110" class="method-detail">
|
507
|
+
<a name="M000110"></a>
|
501
508
|
|
502
509
|
<div class="method-heading">
|
503
|
-
<a href="#
|
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('
|
511
|
-
<div class="method-source-code" id="
|
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
|
514
|
-
|
515
|
-
|
516
|
-
|
517
|
-
|
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>
|