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,148 @@
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::SchemaError</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::SchemaError</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../files/kwalify/errors_rb.html">
59
+ kwalify/errors.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="BaseError.html">
69
+ BaseError
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
+
84
+
85
+ </div>
86
+
87
+ <div id="method-list">
88
+ <h3 class="section-bar">Methods</h3>
89
+
90
+ <div class="name-list">
91
+ <a href="#M000029">new</a>&nbsp;&nbsp;
92
+ </div>
93
+ </div>
94
+
95
+ </div>
96
+
97
+
98
+ <!-- if includes -->
99
+
100
+ <div id="section">
101
+
102
+
103
+
104
+
105
+
106
+
107
+
108
+
109
+ <!-- if method_list -->
110
+ <div id="methods">
111
+ <h3 class="section-bar">Public Class methods</h3>
112
+
113
+ <div id="method-M000029" class="method-detail">
114
+ <a name="M000029"></a>
115
+
116
+ <div class="method-heading">
117
+ <a href="#M000029" class="method-signature">
118
+ <span class="method-name">new</span><span class="method-args">(message=&quot;&quot;, path=nil, rule=nil, value=nil, error_symbol=nil)</span>
119
+ </a>
120
+ </div>
121
+
122
+ <div class="method-description">
123
+ <p><a class="source-toggle" href="#"
124
+ onclick="toggleCode('M000029-source');return false;">[Source]</a></p>
125
+ <div class="method-source-code" id="M000029-source">
126
+ <pre>
127
+ <span class="ruby-comment cmt"># File kwalify/errors.rb, line 54</span>
128
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">message</span>=<span class="ruby-value str">&quot;&quot;</span>, <span class="ruby-identifier">path</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">rule</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">value</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">error_symbol</span>=<span class="ruby-keyword kw">nil</span>)
129
+ <span class="ruby-keyword kw">super</span>(<span class="ruby-identifier">message</span>, <span class="ruby-identifier">path</span>, <span class="ruby-identifier">rule</span>, <span class="ruby-identifier">value</span>, <span class="ruby-identifier">error_symbol</span>)
130
+ <span class="ruby-keyword kw">end</span>
131
+ </pre>
132
+ </div>
133
+ </div>
134
+ </div>
135
+
136
+
137
+ </div>
138
+
139
+
140
+ </div>
141
+
142
+
143
+ <div id="validator-badges">
144
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
145
+ </div>
146
+
147
+ </body>
148
+ </html>
@@ -0,0 +1,301 @@
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>Module: Kwalify::Types</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>Module</strong></td>
53
+ <td class="class-name-in-header">Kwalify::Types</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../files/kwalify/types_rb.html">
59
+ kwalify/types.rb
60
+ </a>
61
+ <br />
62
+ </td>
63
+ </tr>
64
+
65
+ </table>
66
+ </div>
67
+ <!-- banner header -->
68
+
69
+ <div id="bodyContent">
70
+
71
+
72
+
73
+ <div id="contextContent">
74
+
75
+
76
+
77
+ </div>
78
+
79
+ <div id="method-list">
80
+ <h3 class="section-bar">Methods</h3>
81
+
82
+ <div class="name-list">
83
+ <a href="#M000011">collection?</a>&nbsp;&nbsp;
84
+ <a href="#M000013">collection_type?</a>&nbsp;&nbsp;
85
+ <a href="#M000010">get_type_class</a>&nbsp;&nbsp;
86
+ <a href="#M000012">scalar?</a>&nbsp;&nbsp;
87
+ <a href="#M000014">scalar_type?</a>&nbsp;&nbsp;
88
+ <a href="#M000009">type_class</a>&nbsp;&nbsp;
89
+ <a href="#M000008">type_table</a>&nbsp;&nbsp;
90
+ </div>
91
+ </div>
92
+
93
+ </div>
94
+
95
+
96
+ <!-- if includes -->
97
+
98
+ <div id="section">
99
+
100
+
101
+ <div id="constants-list">
102
+ <h3 class="section-bar">Constants</h3>
103
+
104
+ <div class="name-list">
105
+ <table summary="Constants">
106
+ <tr class="top-aligned-row context-row">
107
+ <td class="context-item-name">DEFAULT_TYPE</td>
108
+ <td>=</td>
109
+ <td class="context-item-value">&quot;str&quot;</td>
110
+ </tr>
111
+ </table>
112
+ </div>
113
+ </div>
114
+
115
+
116
+
117
+
118
+
119
+
120
+ <!-- if method_list -->
121
+ <div id="methods">
122
+ <h3 class="section-bar">Public Class methods</h3>
123
+
124
+ <div id="method-M000010" class="method-detail">
125
+ <a name="M000010"></a>
126
+
127
+ <div class="method-heading">
128
+ <a href="#M000010" class="method-signature">
129
+ <span class="method-name">get_type_class</span><span class="method-args">(type)</span>
130
+ </a>
131
+ </div>
132
+
133
+ <div class="method-description">
134
+ <p><a class="source-toggle" href="#"
135
+ onclick="toggleCode('M000010-source');return false;">[Source]</a></p>
136
+ <div class="method-source-code" id="M000010-source">
137
+ <pre>
138
+ <span class="ruby-comment cmt"># File kwalify/types.rb, line 119</span>
139
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">get_type_class</span>(<span class="ruby-identifier">type</span>)
140
+ <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">type_class</span>(<span class="ruby-identifier">type</span>)
141
+ <span class="ruby-keyword kw">end</span>
142
+ </pre>
143
+ </div>
144
+ </div>
145
+ </div>
146
+
147
+ <div id="method-M000009" class="method-detail">
148
+ <a name="M000009"></a>
149
+
150
+ <div class="method-heading">
151
+ <a href="#M000009" class="method-signature">
152
+ <span class="method-name">type_class</span><span class="method-args">(type)</span>
153
+ </a>
154
+ </div>
155
+
156
+ <div class="method-description">
157
+ <p><a class="source-toggle" href="#"
158
+ onclick="toggleCode('M000009-source');return false;">[Source]</a></p>
159
+ <div class="method-source-code" id="M000009-source">
160
+ <pre>
161
+ <span class="ruby-comment cmt"># File kwalify/types.rb, line 113</span>
162
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">type_class</span>(<span class="ruby-identifier">type</span>)
163
+ <span class="ruby-identifier">klass</span> = <span class="ruby-ivar">@@type_table</span>[<span class="ruby-identifier">type</span>]
164
+ <span class="ruby-comment cmt">#assert_error('type=#{type.inspect}') unless klass</span>
165
+ <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">klass</span>
166
+ <span class="ruby-keyword kw">end</span>
167
+ </pre>
168
+ </div>
169
+ </div>
170
+ </div>
171
+
172
+ <div id="method-M000008" class="method-detail">
173
+ <a name="M000008"></a>
174
+
175
+ <div class="method-heading">
176
+ <a href="#M000008" class="method-signature">
177
+ <span class="method-name">type_table</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('M000008-source');return false;">[Source]</a></p>
184
+ <div class="method-source-code" id="M000008-source">
185
+ <pre>
186
+ <span class="ruby-comment cmt"># File kwalify/types.rb, line 109</span>
187
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">type_table</span>
188
+ <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@@type_table</span>
189
+ <span class="ruby-keyword kw">end</span>
190
+ </pre>
191
+ </div>
192
+ </div>
193
+ </div>
194
+
195
+ <h3 class="section-bar">Public Instance methods</h3>
196
+
197
+ <div id="method-M000011" class="method-detail">
198
+ <a name="M000011"></a>
199
+
200
+ <div class="method-heading">
201
+ <a href="#M000011" class="method-signature">
202
+ <span class="method-name">collection?</span><span class="method-args">(val)</span>
203
+ </a>
204
+ </div>
205
+
206
+ <div class="method-description">
207
+ <p><a class="source-toggle" href="#"
208
+ onclick="toggleCode('M000011-source');return false;">[Source]</a></p>
209
+ <div class="method-source-code" id="M000011-source">
210
+ <pre>
211
+ <span class="ruby-comment cmt"># File kwalify/types.rb, line 134</span>
212
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">collection?</span>(<span class="ruby-identifier">val</span>)
213
+ <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">val</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Array</span>) <span class="ruby-operator">||</span> <span class="ruby-identifier">val</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Hash</span>)
214
+ <span class="ruby-keyword kw">end</span>
215
+ </pre>
216
+ </div>
217
+ </div>
218
+ </div>
219
+
220
+ <div id="method-M000013" class="method-detail">
221
+ <a name="M000013"></a>
222
+
223
+ <div class="method-heading">
224
+ <a href="#M000013" class="method-signature">
225
+ <span class="method-name">collection_type?</span><span class="method-args">(type)</span>
226
+ </a>
227
+ </div>
228
+
229
+ <div class="method-description">
230
+ <p><a class="source-toggle" href="#"
231
+ onclick="toggleCode('M000013-source');return false;">[Source]</a></p>
232
+ <div class="method-source-code" id="M000013-source">
233
+ <pre>
234
+ <span class="ruby-comment cmt"># File kwalify/types.rb, line 142</span>
235
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">collection_type?</span>(<span class="ruby-identifier">type</span>)
236
+ <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">type</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'seq'</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">type</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'map'</span>
237
+ <span class="ruby-keyword kw">end</span>
238
+ </pre>
239
+ </div>
240
+ </div>
241
+ </div>
242
+
243
+ <div id="method-M000012" class="method-detail">
244
+ <a name="M000012"></a>
245
+
246
+ <div class="method-heading">
247
+ <a href="#M000012" class="method-signature">
248
+ <span class="method-name">scalar?</span><span class="method-args">(val)</span>
249
+ </a>
250
+ </div>
251
+
252
+ <div class="method-description">
253
+ <p><a class="source-toggle" href="#"
254
+ onclick="toggleCode('M000012-source');return false;">[Source]</a></p>
255
+ <div class="method-source-code" id="M000012-source">
256
+ <pre>
257
+ <span class="ruby-comment cmt"># File kwalify/types.rb, line 138</span>
258
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">scalar?</span>(<span class="ruby-identifier">val</span>)
259
+ <span class="ruby-keyword kw">return</span> <span class="ruby-operator">!</span><span class="ruby-identifier">val</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Array</span>) <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-operator">!</span><span class="ruby-identifier">val</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Hash</span>) <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">val</span>.<span class="ruby-identifier">class</span> <span class="ruby-operator">!=</span> <span class="ruby-constant">Object</span>
260
+ <span class="ruby-keyword kw">end</span>
261
+ </pre>
262
+ </div>
263
+ </div>
264
+ </div>
265
+
266
+ <div id="method-M000014" class="method-detail">
267
+ <a name="M000014"></a>
268
+
269
+ <div class="method-heading">
270
+ <a href="#M000014" class="method-signature">
271
+ <span class="method-name">scalar_type?</span><span class="method-args">(type)</span>
272
+ </a>
273
+ </div>
274
+
275
+ <div class="method-description">
276
+ <p><a class="source-toggle" href="#"
277
+ onclick="toggleCode('M000014-source');return false;">[Source]</a></p>
278
+ <div class="method-source-code" id="M000014-source">
279
+ <pre>
280
+ <span class="ruby-comment cmt"># File kwalify/types.rb, line 146</span>
281
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">scalar_type?</span>(<span class="ruby-identifier">type</span>)
282
+ <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">type</span> <span class="ruby-operator">!=</span> <span class="ruby-value str">'seq'</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">type</span> <span class="ruby-operator">!=</span> <span class="ruby-value str">'map'</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">type</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'any'</span>
283
+ <span class="ruby-keyword kw">end</span>
284
+ </pre>
285
+ </div>
286
+ </div>
287
+ </div>
288
+
289
+
290
+ </div>
291
+
292
+
293
+ </div>
294
+
295
+
296
+ <div id="validator-badges">
297
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
298
+ </div>
299
+
300
+ </body>
301
+ </html>
@@ -0,0 +1,148 @@
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::ValidationError</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::ValidationError</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../files/kwalify/errors_rb.html">
59
+ kwalify/errors.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="BaseError.html">
69
+ BaseError
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
+
84
+
85
+ </div>
86
+
87
+ <div id="method-list">
88
+ <h3 class="section-bar">Methods</h3>
89
+
90
+ <div class="name-list">
91
+ <a href="#M000064">new</a>&nbsp;&nbsp;
92
+ </div>
93
+ </div>
94
+
95
+ </div>
96
+
97
+
98
+ <!-- if includes -->
99
+
100
+ <div id="section">
101
+
102
+
103
+
104
+
105
+
106
+
107
+
108
+
109
+ <!-- if method_list -->
110
+ <div id="methods">
111
+ <h3 class="section-bar">Public Class methods</h3>
112
+
113
+ <div id="method-M000064" class="method-detail">
114
+ <a name="M000064"></a>
115
+
116
+ <div class="method-heading">
117
+ <a href="#M000064" class="method-signature">
118
+ <span class="method-name">new</span><span class="method-args">(message=&quot;&quot;, path=nil, rule=nil, value=nil, error_symbol=nil)</span>
119
+ </a>
120
+ </div>
121
+
122
+ <div class="method-description">
123
+ <p><a class="source-toggle" href="#"
124
+ onclick="toggleCode('M000064-source');return false;">[Source]</a></p>
125
+ <div class="method-source-code" id="M000064-source">
126
+ <pre>
127
+ <span class="ruby-comment cmt"># File kwalify/errors.rb, line 61</span>
128
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">message</span>=<span class="ruby-value str">&quot;&quot;</span>, <span class="ruby-identifier">path</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">rule</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">value</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">error_symbol</span>=<span class="ruby-keyword kw">nil</span>)
129
+ <span class="ruby-keyword kw">super</span>(<span class="ruby-identifier">message</span>, <span class="ruby-identifier">path</span>, <span class="ruby-identifier">rule</span>, <span class="ruby-identifier">value</span>, <span class="ruby-identifier">error_symbol</span>)
130
+ <span class="ruby-keyword kw">end</span>
131
+ </pre>
132
+ </div>
133
+ </div>
134
+ </div>
135
+
136
+
137
+ </div>
138
+
139
+
140
+ </div>
141
+
142
+
143
+ <div id="validator-badges">
144
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
145
+ </div>
146
+
147
+ </body>
148
+ </html>