kwalify 0.5.1 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (109) hide show
  1. data/ChangeLog +24 -19
  2. data/README.txt +51 -51
  3. data/bin/kwalify +2 -2
  4. data/contrib/inline-require +151 -0
  5. data/contrib/kwalify +2850 -0
  6. data/doc-api/classes/CommandOptionError.html +184 -0
  7. data/doc-api/classes/CommandOptionParser.html +325 -0
  8. data/doc-api/classes/Kwalify.html +270 -0
  9. data/doc-api/classes/Kwalify/AssertionError.html +148 -0
  10. data/doc-api/classes/Kwalify/BaseError.html +296 -0
  11. data/doc-api/classes/Kwalify/CommandOptionError.html +168 -0
  12. data/doc-api/classes/Kwalify/ErrorHelper.html +218 -0
  13. data/doc-api/classes/Kwalify/HashInterface.html +240 -0
  14. data/doc-api/classes/Kwalify/KwalifyError.html +111 -0
  15. data/doc-api/classes/Kwalify/Main.html +336 -0
  16. data/doc-api/classes/Kwalify/MetaValidator.html +432 -0
  17. data/doc-api/classes/Kwalify/Parser.html +155 -0
  18. data/doc-api/classes/Kwalify/PlainYamlParser.html +520 -0
  19. data/doc-api/classes/Kwalify/PlainYamlParser/Alias.html +165 -0
  20. data/doc-api/classes/Kwalify/Rule.html +411 -0
  21. data/doc-api/classes/Kwalify/SchemaError.html +148 -0
  22. data/doc-api/classes/Kwalify/Types.html +301 -0
  23. data/doc-api/classes/Kwalify/ValidationError.html +148 -0
  24. data/doc-api/classes/Kwalify/Validator.html +311 -0
  25. data/doc-api/classes/Kwalify/YamlParser.html +535 -0
  26. data/doc-api/classes/Kwalify/YamlSyntaxError.html +168 -0
  27. data/doc-api/classes/Test.html +107 -0
  28. data/doc-api/classes/Test/Unit.html +101 -0
  29. data/doc-api/classes/YamlHelper.html +259 -0
  30. data/doc-api/created.rid +1 -0
  31. data/doc-api/files/__/README_txt.html +179 -0
  32. data/doc-api/files/kwalify/errors_rb.html +114 -0
  33. data/doc-api/files/kwalify/main_rb.html +117 -0
  34. data/doc-api/files/kwalify/messages_rb.html +107 -0
  35. data/doc-api/files/kwalify/meta-validator_rb.html +117 -0
  36. data/doc-api/files/kwalify/rule_rb.html +116 -0
  37. data/doc-api/files/kwalify/types_rb.html +114 -0
  38. data/doc-api/files/kwalify/util/assert-text-equal_rb.html +115 -0
  39. data/doc-api/files/kwalify/util/hash-interface_rb.html +107 -0
  40. data/doc-api/files/kwalify/util/option-parser_rb.html +107 -0
  41. data/doc-api/files/kwalify/util/testcase-helper_rb.html +115 -0
  42. data/doc-api/files/kwalify/util/yaml-helper_rb.html +114 -0
  43. data/doc-api/files/kwalify/validator_rb.html +117 -0
  44. data/doc-api/files/kwalify/yaml-parser_rb.html +117 -0
  45. data/doc-api/files/kwalify_rb.html +120 -0
  46. data/doc-api/fr_class_index.html +50 -0
  47. data/doc-api/fr_file_index.html +41 -0
  48. data/doc-api/fr_method_index.html +109 -0
  49. data/doc-api/index.html +24 -0
  50. data/doc-api/rdoc-style.css +208 -0
  51. data/doc/users-guide.html +693 -193
  52. data/examples/address-book/Makefile +5 -0
  53. data/examples/address-book/address-book.schema.yaml +2 -1
  54. data/examples/invoice/Makefile +5 -0
  55. data/examples/invoice/invoice.schema.yaml +3 -2
  56. data/examples/tapkit/Makefile +5 -0
  57. data/examples/tapkit/main.rb +7 -0
  58. data/examples/tapkit/tapkit.schema.yaml +6 -1
  59. data/lib/kwalify.rb +3 -3
  60. data/lib/kwalify/errors.rb +2 -2
  61. data/lib/kwalify/main.rb +161 -84
  62. data/lib/kwalify/messages.rb +17 -11
  63. data/lib/kwalify/meta-validator.rb +11 -2
  64. data/lib/kwalify/rule.rb +13 -3
  65. data/lib/kwalify/templates/genclass-java.eruby +195 -0
  66. data/lib/kwalify/templates/genclass-ruby.eruby +84 -0
  67. data/lib/kwalify/types.rb +18 -18
  68. data/lib/kwalify/util/assert-text-equal.rb +44 -0
  69. data/lib/kwalify/util/hash-interface.rb +37 -0
  70. data/lib/kwalify/util/option-parser.rb +2 -2
  71. data/lib/kwalify/util/testcase-helper.rb +112 -0
  72. data/lib/kwalify/util/yaml-helper.rb +2 -2
  73. data/lib/kwalify/validator.rb +2 -2
  74. data/lib/kwalify/yaml-parser.rb +12 -9
  75. data/test/test-main.rb +77 -78
  76. data/test/test-main.yaml +543 -769
  77. data/test/test-metavalidator.rb +27 -47
  78. data/test/test-metavalidator.yaml +21 -2
  79. data/test/test-rule.rb +6 -39
  80. data/test/test-rule.yaml +2 -2
  81. data/test/test-validator.rb +36 -869
  82. data/test/test-validator.yaml +28 -20
  83. data/test/test-yamlparser.rb +30 -1248
  84. data/test/test-yamlparser.yaml +138 -110
  85. data/test/test.rb +33 -13
  86. data/test/tmp.dir/Context.java +40 -0
  87. data/test/tmp.dir/Group.java +33 -0
  88. data/test/tmp.dir/User.java +43 -0
  89. data/test/tmp.dir/action1.document +18 -0
  90. data/test/tmp.dir/action1.schema +32 -0
  91. data/test/tmp.dir/action2.document +18 -0
  92. data/test/tmp.dir/action2.schema +32 -0
  93. data/test/tmp.dir/emacs.document +6 -0
  94. data/test/tmp.dir/emacs.schema +6 -0
  95. data/test/tmp.dir/meta1.document +0 -0
  96. data/test/tmp.dir/meta1.schema +3 -0
  97. data/test/tmp.dir/meta2.document +0 -0
  98. data/test/tmp.dir/meta2.schema +3 -0
  99. data/test/tmp.dir/silent1.document +3 -0
  100. data/test/tmp.dir/silent1.schema +3 -0
  101. data/test/tmp.dir/silent2.document +7 -0
  102. data/test/tmp.dir/silent2.schema +3 -0
  103. data/test/tmp.dir/stream.invalid +8 -0
  104. data/test/tmp.dir/stream.schema +3 -0
  105. data/test/tmp.dir/stream.valid +8 -0
  106. data/test/tmp.dir/untabify.document +5 -0
  107. data/test/tmp.dir/untabify.schema +10 -0
  108. metadata +98 -12
  109. data/lib/kwalify/util/assert-diff.rb +0 -44
@@ -0,0 +1,155 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
+ <head>
8
+ <title>Class: Kwalify::Parser</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
12
+ <script type="text/javascript">
13
+ // <![CDATA[
14
+
15
+ function popupCode( url ) {
16
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
+ }
18
+
19
+ function toggleCode( id ) {
20
+ if ( document.getElementById )
21
+ elem = document.getElementById( id );
22
+ else if ( document.all )
23
+ elem = eval( "document.all." + id );
24
+ else
25
+ return false;
26
+
27
+ elemStyle = elem.style;
28
+
29
+ if ( elemStyle.display != "block" ) {
30
+ elemStyle.display = "block"
31
+ } else {
32
+ elemStyle.display = "none"
33
+ }
34
+
35
+ return true;
36
+ }
37
+
38
+ // Make codeblocks hidden by default
39
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
+
41
+ // ]]>
42
+ </script>
43
+
44
+ </head>
45
+ <body>
46
+
47
+
48
+
49
+ <div id="classHeader">
50
+ <table class="header-table">
51
+ <tr class="top-aligned-row">
52
+ <td><strong>Class</strong></td>
53
+ <td class="class-name-in-header">Kwalify::Parser</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../files/kwalify/yaml-parser_rb.html">
59
+ kwalify/yaml-parser.rb
60
+ </a>
61
+ <br />
62
+ </td>
63
+ </tr>
64
+
65
+ <tr class="top-aligned-row">
66
+ <td><strong>Parent:</strong></td>
67
+ <td>
68
+ <a href="YamlParser.html">
69
+ YamlParser
70
+ </a>
71
+ </td>
72
+ </tr>
73
+ </table>
74
+ </div>
75
+ <!-- banner header -->
76
+
77
+ <div id="bodyContent">
78
+
79
+
80
+
81
+ <div id="contextContent">
82
+
83
+ <div id="description">
84
+ <p>
85
+ obsolete
86
+ </p>
87
+
88
+ </div>
89
+
90
+
91
+ </div>
92
+
93
+ <div id="method-list">
94
+ <h3 class="section-bar">Methods</h3>
95
+
96
+ <div class="name-list">
97
+ <a href="#M000036">new</a>&nbsp;&nbsp;
98
+ </div>
99
+ </div>
100
+
101
+ </div>
102
+
103
+
104
+ <!-- if includes -->
105
+
106
+ <div id="section">
107
+
108
+
109
+
110
+
111
+
112
+
113
+
114
+
115
+ <!-- if method_list -->
116
+ <div id="methods">
117
+ <h3 class="section-bar">Public Class methods</h3>
118
+
119
+ <div id="method-M000036" class="method-detail">
120
+ <a name="M000036"></a>
121
+
122
+ <div class="method-heading">
123
+ <a href="#M000036" class="method-signature">
124
+ <span class="method-name">new</span><span class="method-args">(yaml_str)</span>
125
+ </a>
126
+ </div>
127
+
128
+ <div class="method-description">
129
+ <p><a class="source-toggle" href="#"
130
+ onclick="toggleCode('M000036-source');return false;">[Source]</a></p>
131
+ <div class="method-source-code" id="M000036-source">
132
+ <pre>
133
+ <span class="ruby-comment cmt"># File kwalify/yaml-parser.rb, line 785</span>
134
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">yaml_str</span>)
135
+ <span class="ruby-keyword kw">super</span>(<span class="ruby-identifier">yaml_str</span>)
136
+ <span class="ruby-identifier">$stderr</span>.<span class="ruby-identifier">puts</span> <span class="ruby-value str">&quot;*** class Kwalify::Parser is obsolete. Please use Kwalify::YamlParser instead.&quot;</span>
137
+ <span class="ruby-keyword kw">end</span>
138
+ </pre>
139
+ </div>
140
+ </div>
141
+ </div>
142
+
143
+
144
+ </div>
145
+
146
+
147
+ </div>
148
+
149
+
150
+ <div id="validator-badges">
151
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
152
+ </div>
153
+
154
+ </body>
155
+ </html>
@@ -0,0 +1,520 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
+ <head>
8
+ <title>Class: Kwalify::PlainYamlParser</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
12
+ <script type="text/javascript">
13
+ // <![CDATA[
14
+
15
+ function popupCode( url ) {
16
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
+ }
18
+
19
+ function toggleCode( id ) {
20
+ if ( document.getElementById )
21
+ elem = document.getElementById( id );
22
+ else if ( document.all )
23
+ elem = eval( "document.all." + id );
24
+ else
25
+ return false;
26
+
27
+ elemStyle = elem.style;
28
+
29
+ if ( elemStyle.display != "block" ) {
30
+ elemStyle.display = "block"
31
+ } else {
32
+ elemStyle.display = "none"
33
+ }
34
+
35
+ return true;
36
+ }
37
+
38
+ // Make codeblocks hidden by default
39
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
+
41
+ // ]]>
42
+ </script>
43
+
44
+ </head>
45
+ <body>
46
+
47
+
48
+
49
+ <div id="classHeader">
50
+ <table class="header-table">
51
+ <tr class="top-aligned-row">
52
+ <td><strong>Class</strong></td>
53
+ <td class="class-name-in-header">Kwalify::PlainYamlParser</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../files/kwalify/yaml-parser_rb.html">
59
+ kwalify/yaml-parser.rb
60
+ </a>
61
+ <br />
62
+ </td>
63
+ </tr>
64
+
65
+ <tr class="top-aligned-row">
66
+ <td><strong>Parent:</strong></td>
67
+ <td>
68
+ Object
69
+ </td>
70
+ </tr>
71
+ </table>
72
+ </div>
73
+ <!-- banner header -->
74
+
75
+ <div id="bodyContent">
76
+
77
+
78
+
79
+ <div id="contextContent">
80
+
81
+ <div id="description">
82
+ <p>
83
+ ex.
84
+ </p>
85
+ <pre>
86
+ str = ARGF.read()
87
+ parser = Kwalify::PlainYamlParser.new(str)
88
+ doc = parser.parse()
89
+ p doc
90
+ </pre>
91
+
92
+ </div>
93
+
94
+
95
+ </div>
96
+
97
+ <div id="method-list">
98
+ <h3 class="section-bar">Methods</h3>
99
+
100
+ <div class="name-list">
101
+ <a href="#M000073">add_to_map</a>&nbsp;&nbsp;
102
+ <a href="#M000070">add_to_seq</a>&nbsp;&nbsp;
103
+ <a href="#M000072">create_mapping</a>&nbsp;&nbsp;
104
+ <a href="#M000077">create_scalar</a>&nbsp;&nbsp;
105
+ <a href="#M000069">create_sequence</a>&nbsp;&nbsp;
106
+ <a href="#M000078">current_line</a>&nbsp;&nbsp;
107
+ <a href="#M000079">current_linenum</a>&nbsp;&nbsp;
108
+ <a href="#M000067">has_next?</a>&nbsp;&nbsp;
109
+ <a href="#M000076">merge_map</a>&nbsp;&nbsp;
110
+ <a href="#M000065">new</a>&nbsp;&nbsp;
111
+ <a href="#M000066">parse</a>&nbsp;&nbsp;
112
+ <a href="#M000068">parse_all</a>&nbsp;&nbsp;
113
+ <a href="#M000075">set_default</a>&nbsp;&nbsp;
114
+ <a href="#M000074">set_map_with</a>&nbsp;&nbsp;
115
+ <a href="#M000071">set_seq_at</a>&nbsp;&nbsp;
116
+ </div>
117
+ </div>
118
+
119
+ </div>
120
+
121
+
122
+ <!-- if includes -->
123
+
124
+ <div id="section">
125
+
126
+ <div id="class-list">
127
+ <h3 class="section-bar">Classes and Modules</h3>
128
+
129
+ Class <a href="PlainYamlParser/Alias.html" class="link">Kwalify::PlainYamlParser::Alias</a><br />
130
+
131
+ </div>
132
+
133
+
134
+
135
+
136
+
137
+
138
+
139
+ <!-- if method_list -->
140
+ <div id="methods">
141
+ <h3 class="section-bar">Public Class methods</h3>
142
+
143
+ <div id="method-M000065" class="method-detail">
144
+ <a name="M000065"></a>
145
+
146
+ <div class="method-heading">
147
+ <a href="#M000065" class="method-signature">
148
+ <span class="method-name">new</span><span class="method-args">(yaml_str)</span>
149
+ </a>
150
+ </div>
151
+
152
+ <div class="method-description">
153
+ <p><a class="source-toggle" href="#"
154
+ onclick="toggleCode('M000065-source');return false;">[Source]</a></p>
155
+ <div class="method-source-code" id="M000065-source">
156
+ <pre>
157
+ <span class="ruby-comment cmt"># File kwalify/yaml-parser.rb, line 34</span>
158
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">yaml_str</span>)
159
+ <span class="ruby-ivar">@lines</span> = <span class="ruby-identifier">yaml_str</span>.<span class="ruby-identifier">to_a</span>()
160
+ <span class="ruby-ivar">@line</span> = <span class="ruby-keyword kw">nil</span>
161
+ <span class="ruby-ivar">@linenum</span> = <span class="ruby-value">0</span>
162
+ <span class="ruby-ivar">@anchors</span> = {}
163
+ <span class="ruby-ivar">@aliases</span> = {}
164
+ <span class="ruby-keyword kw">end</span>
165
+ </pre>
166
+ </div>
167
+ </div>
168
+ </div>
169
+
170
+ <h3 class="section-bar">Public Instance methods</h3>
171
+
172
+ <div id="method-M000067" class="method-detail">
173
+ <a name="M000067"></a>
174
+
175
+ <div class="method-heading">
176
+ <a href="#M000067" class="method-signature">
177
+ <span class="method-name">has_next?</span><span class="method-args">()</span>
178
+ </a>
179
+ </div>
180
+
181
+ <div class="method-description">
182
+ <p><a class="source-toggle" href="#"
183
+ onclick="toggleCode('M000067-source');return false;">[Source]</a></p>
184
+ <div class="method-source-code" id="M000067-source">
185
+ <pre>
186
+ <span class="ruby-comment cmt"># File kwalify/yaml-parser.rb, line 53</span>
187
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">has_next?</span>
188
+ <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@end_flag</span> <span class="ruby-operator">!=</span> <span class="ruby-value str">'EOF'</span>
189
+ <span class="ruby-keyword kw">end</span>
190
+ </pre>
191
+ </div>
192
+ </div>
193
+ </div>
194
+
195
+ <div id="method-M000066" class="method-detail">
196
+ <a name="M000066"></a>
197
+
198
+ <div class="method-heading">
199
+ <a href="#M000066" class="method-signature">
200
+ <span class="method-name">parse</span><span class="method-args">()</span>
201
+ </a>
202
+ </div>
203
+
204
+ <div class="method-description">
205
+ <p><a class="source-toggle" href="#"
206
+ onclick="toggleCode('M000066-source');return false;">[Source]</a></p>
207
+ <div class="method-source-code" id="M000066-source">
208
+ <pre>
209
+ <span class="ruby-comment cmt"># File kwalify/yaml-parser.rb, line 43</span>
210
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">parse</span>()
211
+ <span class="ruby-identifier">data</span> = <span class="ruby-identifier">parse_child</span>(<span class="ruby-value">0</span>)
212
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">data</span> <span class="ruby-operator">==</span> <span class="ruby-keyword kw">nil</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-ivar">@end_flag</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'---'</span>
213
+ <span class="ruby-identifier">data</span> = <span class="ruby-identifier">parse_child</span>(<span class="ruby-value">0</span>)
214
+ <span class="ruby-keyword kw">end</span>
215
+ <span class="ruby-identifier">resolve_aliases</span>(<span class="ruby-identifier">data</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@aliases</span>.<span class="ruby-identifier">empty?</span>
216
+ <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">data</span>
217
+ <span class="ruby-keyword kw">end</span>
218
+ </pre>
219
+ </div>
220
+ </div>
221
+ </div>
222
+
223
+ <div id="method-M000068" class="method-detail">
224
+ <a name="M000068"></a>
225
+
226
+ <div class="method-heading">
227
+ <a href="#M000068" class="method-signature">
228
+ <span class="method-name">parse_all</span><span class="method-args">()</span>
229
+ </a>
230
+ </div>
231
+
232
+ <div class="method-description">
233
+ <p><a class="source-toggle" href="#"
234
+ onclick="toggleCode('M000068-source');return false;">[Source]</a></p>
235
+ <div class="method-source-code" id="M000068-source">
236
+ <pre>
237
+ <span class="ruby-comment cmt"># File kwalify/yaml-parser.rb, line 58</span>
238
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">parse_all</span>
239
+ <span class="ruby-identifier">list</span> = []
240
+ <span class="ruby-keyword kw">while</span> <span class="ruby-identifier">has_next</span>()
241
+ <span class="ruby-identifier">doc</span> = <span class="ruby-identifier">parse</span>()
242
+ <span class="ruby-identifier">list</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">doc</span>
243
+ <span class="ruby-keyword kw">end</span>
244
+ <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">list</span>
245
+ <span class="ruby-keyword kw">end</span>
246
+ </pre>
247
+ </div>
248
+ </div>
249
+ </div>
250
+
251
+ <h3 class="section-bar">Protected Instance methods</h3>
252
+
253
+ <div id="method-M000073" class="method-detail">
254
+ <a name="M000073"></a>
255
+
256
+ <div class="method-heading">
257
+ <a href="#M000073" class="method-signature">
258
+ <span class="method-name">add_to_map</span><span class="method-args">(map, key, value, linenum)</span>
259
+ </a>
260
+ </div>
261
+
262
+ <div class="method-description">
263
+ <p><a class="source-toggle" href="#"
264
+ onclick="toggleCode('M000073-source');return false;">[Source]</a></p>
265
+ <div class="method-source-code" id="M000073-source">
266
+ <pre>
267
+ <span class="ruby-comment cmt"># File kwalify/yaml-parser.rb, line 87</span>
268
+ <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>)
269
+ <span class="ruby-identifier">map</span>[<span class="ruby-identifier">key</span>] = <span class="ruby-identifier">value</span>
270
+ <span class="ruby-keyword kw">end</span>
271
+ </pre>
272
+ </div>
273
+ </div>
274
+ </div>
275
+
276
+ <div id="method-M000070" class="method-detail">
277
+ <a name="M000070"></a>
278
+
279
+ <div class="method-heading">
280
+ <a href="#M000070" class="method-signature">
281
+ <span class="method-name">add_to_seq</span><span class="method-args">(seq, value, linenum)</span>
282
+ </a>
283
+ </div>
284
+
285
+ <div class="method-description">
286
+ <p><a class="source-toggle" href="#"
287
+ onclick="toggleCode('M000070-source');return false;">[Source]</a></p>
288
+ <div class="method-source-code" id="M000070-source">
289
+ <pre>
290
+ <span class="ruby-comment cmt"># File kwalify/yaml-parser.rb, line 75</span>
291
+ <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>)
292
+ <span class="ruby-identifier">seq</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">value</span>
293
+ <span class="ruby-keyword kw">end</span>
294
+ </pre>
295
+ </div>
296
+ </div>
297
+ </div>
298
+
299
+ <div id="method-M000072" class="method-detail">
300
+ <a name="M000072"></a>
301
+
302
+ <div class="method-heading">
303
+ <a href="#M000072" class="method-signature">
304
+ <span class="method-name">create_mapping</span><span class="method-args">(linenum=nil)</span>
305
+ </a>
306
+ </div>
307
+
308
+ <div class="method-description">
309
+ <p><a class="source-toggle" href="#"
310
+ onclick="toggleCode('M000072-source');return false;">[Source]</a></p>
311
+ <div class="method-source-code" id="M000072-source">
312
+ <pre>
313
+ <span class="ruby-comment cmt"># File kwalify/yaml-parser.rb, line 83</span>
314
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">create_mapping</span>(<span class="ruby-identifier">linenum</span>=<span class="ruby-keyword kw">nil</span>)
315
+ <span class="ruby-keyword kw">return</span> {}
316
+ <span class="ruby-keyword kw">end</span>
317
+ </pre>
318
+ </div>
319
+ </div>
320
+ </div>
321
+
322
+ <div id="method-M000077" class="method-detail">
323
+ <a name="M000077"></a>
324
+
325
+ <div class="method-heading">
326
+ <a href="#M000077" class="method-signature">
327
+ <span class="method-name">create_scalar</span><span class="method-args">(value, linenum=nil)</span>
328
+ </a>
329
+ </div>
330
+
331
+ <div class="method-description">
332
+ <p><a class="source-toggle" href="#"
333
+ onclick="toggleCode('M000077-source');return false;">[Source]</a></p>
334
+ <div class="method-source-code" id="M000077-source">
335
+ <pre>
336
+ <span class="ruby-comment cmt"># File kwalify/yaml-parser.rb, line 105</span>
337
+ <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-keyword kw">nil</span>)
338
+ <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">value</span>
339
+ <span class="ruby-keyword kw">end</span>
340
+ </pre>
341
+ </div>
342
+ </div>
343
+ </div>
344
+
345
+ <div id="method-M000069" class="method-detail">
346
+ <a name="M000069"></a>
347
+
348
+ <div class="method-heading">
349
+ <a href="#M000069" class="method-signature">
350
+ <span class="method-name">create_sequence</span><span class="method-args">(linenum=nil)</span>
351
+ </a>
352
+ </div>
353
+
354
+ <div class="method-description">
355
+ <p><a class="source-toggle" href="#"
356
+ onclick="toggleCode('M000069-source');return false;">[Source]</a></p>
357
+ <div class="method-source-code" id="M000069-source">
358
+ <pre>
359
+ <span class="ruby-comment cmt"># File kwalify/yaml-parser.rb, line 71</span>
360
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">create_sequence</span>(<span class="ruby-identifier">linenum</span>=<span class="ruby-keyword kw">nil</span>)
361
+ <span class="ruby-keyword kw">return</span> []
362
+ <span class="ruby-keyword kw">end</span>
363
+ </pre>
364
+ </div>
365
+ </div>
366
+ </div>
367
+
368
+ <div id="method-M000078" class="method-detail">
369
+ <a name="M000078"></a>
370
+
371
+ <div class="method-heading">
372
+ <a href="#M000078" class="method-signature">
373
+ <span class="method-name">current_line</span><span class="method-args">()</span>
374
+ </a>
375
+ </div>
376
+
377
+ <div class="method-description">
378
+ <p><a class="source-toggle" href="#"
379
+ onclick="toggleCode('M000078-source');return false;">[Source]</a></p>
380
+ <div class="method-source-code" id="M000078-source">
381
+ <pre>
382
+ <span class="ruby-comment cmt"># File kwalify/yaml-parser.rb, line 110</span>
383
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">current_line</span>
384
+ <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@line</span>
385
+ <span class="ruby-keyword kw">end</span>
386
+ </pre>
387
+ </div>
388
+ </div>
389
+ </div>
390
+
391
+ <div id="method-M000079" class="method-detail">
392
+ <a name="M000079"></a>
393
+
394
+ <div class="method-heading">
395
+ <a href="#M000079" class="method-signature">
396
+ <span class="method-name">current_linenum</span><span class="method-args">()</span>
397
+ </a>
398
+ </div>
399
+
400
+ <div class="method-description">
401
+ <p><a class="source-toggle" href="#"
402
+ onclick="toggleCode('M000079-source');return false;">[Source]</a></p>
403
+ <div class="method-source-code" id="M000079-source">
404
+ <pre>
405
+ <span class="ruby-comment cmt"># File kwalify/yaml-parser.rb, line 114</span>
406
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">current_linenum</span>
407
+ <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@linenum</span>
408
+ <span class="ruby-keyword kw">end</span>
409
+ </pre>
410
+ </div>
411
+ </div>
412
+ </div>
413
+
414
+ <div id="method-M000076" class="method-detail">
415
+ <a name="M000076"></a>
416
+
417
+ <div class="method-heading">
418
+ <a href="#M000076" class="method-signature">
419
+ <span class="method-name">merge_map</span><span class="method-args">(map, map2, linenum)</span>
420
+ </a>
421
+ </div>
422
+
423
+ <div class="method-description">
424
+ <p><a class="source-toggle" href="#"
425
+ onclick="toggleCode('M000076-source');return false;">[Source]</a></p>
426
+ <div class="method-source-code" id="M000076-source">
427
+ <pre>
428
+ <span class="ruby-comment cmt"># File kwalify/yaml-parser.rb, line 99</span>
429
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">merge_map</span>(<span class="ruby-identifier">map</span>, <span class="ruby-identifier">map2</span>, <span class="ruby-identifier">linenum</span>)
430
+ <span class="ruby-identifier">map2</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>
431
+ <span class="ruby-identifier">map</span>[<span class="ruby-identifier">key</span>] = <span class="ruby-identifier">value</span> <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>)
432
+ <span class="ruby-keyword kw">end</span>
433
+ <span class="ruby-keyword kw">end</span>
434
+ </pre>
435
+ </div>
436
+ </div>
437
+ </div>
438
+
439
+ <div id="method-M000075" class="method-detail">
440
+ <a name="M000075"></a>
441
+
442
+ <div class="method-heading">
443
+ <a href="#M000075" class="method-signature">
444
+ <span class="method-name">set_default</span><span class="method-args">(map, value, linenum)</span>
445
+ </a>
446
+ </div>
447
+
448
+ <div class="method-description">
449
+ <p><a class="source-toggle" href="#"
450
+ onclick="toggleCode('M000075-source');return false;">[Source]</a></p>
451
+ <div class="method-source-code" id="M000075-source">
452
+ <pre>
453
+ <span class="ruby-comment cmt"># File kwalify/yaml-parser.rb, line 95</span>
454
+ <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>)
455
+ <span class="ruby-identifier">map</span>.<span class="ruby-identifier">value</span> = <span class="ruby-identifier">value</span>
456
+ <span class="ruby-keyword kw">end</span>
457
+ </pre>
458
+ </div>
459
+ </div>
460
+ </div>
461
+
462
+ <div id="method-M000074" class="method-detail">
463
+ <a name="M000074"></a>
464
+
465
+ <div class="method-heading">
466
+ <a href="#M000074" class="method-signature">
467
+ <span class="method-name">set_map_with</span><span class="method-args">(map, key, value, linenum)</span>
468
+ </a>
469
+ </div>
470
+
471
+ <div class="method-description">
472
+ <p><a class="source-toggle" href="#"
473
+ onclick="toggleCode('M000074-source');return false;">[Source]</a></p>
474
+ <div class="method-source-code" id="M000074-source">
475
+ <pre>
476
+ <span class="ruby-comment cmt"># File kwalify/yaml-parser.rb, line 91</span>
477
+ <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>)
478
+ <span class="ruby-identifier">map</span>[<span class="ruby-identifier">key</span>] = <span class="ruby-identifier">value</span>
479
+ <span class="ruby-keyword kw">end</span>
480
+ </pre>
481
+ </div>
482
+ </div>
483
+ </div>
484
+
485
+ <div id="method-M000071" class="method-detail">
486
+ <a name="M000071"></a>
487
+
488
+ <div class="method-heading">
489
+ <a href="#M000071" class="method-signature">
490
+ <span class="method-name">set_seq_at</span><span class="method-args">(seq, i, value, linenum)</span>
491
+ </a>
492
+ </div>
493
+
494
+ <div class="method-description">
495
+ <p><a class="source-toggle" href="#"
496
+ onclick="toggleCode('M000071-source');return false;">[Source]</a></p>
497
+ <div class="method-source-code" id="M000071-source">
498
+ <pre>
499
+ <span class="ruby-comment cmt"># File kwalify/yaml-parser.rb, line 79</span>
500
+ <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>)
501
+ <span class="ruby-identifier">seq</span>[<span class="ruby-identifier">i</span>] = <span class="ruby-identifier">value</span>
502
+ <span class="ruby-keyword kw">end</span>
503
+ </pre>
504
+ </div>
505
+ </div>
506
+ </div>
507
+
508
+
509
+ </div>
510
+
511
+
512
+ </div>
513
+
514
+
515
+ <div id="validator-badges">
516
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
517
+ </div>
518
+
519
+ </body>
520
+ </html>