kwalify 0.5.1 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +24 -19
- data/README.txt +51 -51
- data/bin/kwalify +2 -2
- data/contrib/inline-require +151 -0
- data/contrib/kwalify +2850 -0
- data/doc-api/classes/CommandOptionError.html +184 -0
- data/doc-api/classes/CommandOptionParser.html +325 -0
- data/doc-api/classes/Kwalify.html +270 -0
- data/doc-api/classes/Kwalify/AssertionError.html +148 -0
- data/doc-api/classes/Kwalify/BaseError.html +296 -0
- data/doc-api/classes/Kwalify/CommandOptionError.html +168 -0
- data/doc-api/classes/Kwalify/ErrorHelper.html +218 -0
- data/doc-api/classes/Kwalify/HashInterface.html +240 -0
- data/doc-api/classes/Kwalify/KwalifyError.html +111 -0
- data/doc-api/classes/Kwalify/Main.html +336 -0
- data/doc-api/classes/Kwalify/MetaValidator.html +432 -0
- data/doc-api/classes/Kwalify/Parser.html +155 -0
- data/doc-api/classes/Kwalify/PlainYamlParser.html +520 -0
- data/doc-api/classes/Kwalify/PlainYamlParser/Alias.html +165 -0
- data/doc-api/classes/Kwalify/Rule.html +411 -0
- data/doc-api/classes/Kwalify/SchemaError.html +148 -0
- data/doc-api/classes/Kwalify/Types.html +301 -0
- data/doc-api/classes/Kwalify/ValidationError.html +148 -0
- data/doc-api/classes/Kwalify/Validator.html +311 -0
- data/doc-api/classes/Kwalify/YamlParser.html +535 -0
- data/doc-api/classes/Kwalify/YamlSyntaxError.html +168 -0
- data/doc-api/classes/Test.html +107 -0
- data/doc-api/classes/Test/Unit.html +101 -0
- data/doc-api/classes/YamlHelper.html +259 -0
- data/doc-api/created.rid +1 -0
- data/doc-api/files/__/README_txt.html +179 -0
- data/doc-api/files/kwalify/errors_rb.html +114 -0
- data/doc-api/files/kwalify/main_rb.html +117 -0
- data/doc-api/files/kwalify/messages_rb.html +107 -0
- data/doc-api/files/kwalify/meta-validator_rb.html +117 -0
- data/doc-api/files/kwalify/rule_rb.html +116 -0
- data/doc-api/files/kwalify/types_rb.html +114 -0
- data/doc-api/files/kwalify/util/assert-text-equal_rb.html +115 -0
- data/doc-api/files/kwalify/util/hash-interface_rb.html +107 -0
- data/doc-api/files/kwalify/util/option-parser_rb.html +107 -0
- data/doc-api/files/kwalify/util/testcase-helper_rb.html +115 -0
- data/doc-api/files/kwalify/util/yaml-helper_rb.html +114 -0
- data/doc-api/files/kwalify/validator_rb.html +117 -0
- data/doc-api/files/kwalify/yaml-parser_rb.html +117 -0
- data/doc-api/files/kwalify_rb.html +120 -0
- data/doc-api/fr_class_index.html +50 -0
- data/doc-api/fr_file_index.html +41 -0
- data/doc-api/fr_method_index.html +109 -0
- data/doc-api/index.html +24 -0
- data/doc-api/rdoc-style.css +208 -0
- data/doc/users-guide.html +693 -193
- data/examples/address-book/Makefile +5 -0
- data/examples/address-book/address-book.schema.yaml +2 -1
- data/examples/invoice/Makefile +5 -0
- data/examples/invoice/invoice.schema.yaml +3 -2
- data/examples/tapkit/Makefile +5 -0
- data/examples/tapkit/main.rb +7 -0
- data/examples/tapkit/tapkit.schema.yaml +6 -1
- data/lib/kwalify.rb +3 -3
- data/lib/kwalify/errors.rb +2 -2
- data/lib/kwalify/main.rb +161 -84
- data/lib/kwalify/messages.rb +17 -11
- data/lib/kwalify/meta-validator.rb +11 -2
- data/lib/kwalify/rule.rb +13 -3
- data/lib/kwalify/templates/genclass-java.eruby +195 -0
- data/lib/kwalify/templates/genclass-ruby.eruby +84 -0
- data/lib/kwalify/types.rb +18 -18
- data/lib/kwalify/util/assert-text-equal.rb +44 -0
- data/lib/kwalify/util/hash-interface.rb +37 -0
- data/lib/kwalify/util/option-parser.rb +2 -2
- data/lib/kwalify/util/testcase-helper.rb +112 -0
- data/lib/kwalify/util/yaml-helper.rb +2 -2
- data/lib/kwalify/validator.rb +2 -2
- data/lib/kwalify/yaml-parser.rb +12 -9
- data/test/test-main.rb +77 -78
- data/test/test-main.yaml +543 -769
- data/test/test-metavalidator.rb +27 -47
- data/test/test-metavalidator.yaml +21 -2
- data/test/test-rule.rb +6 -39
- data/test/test-rule.yaml +2 -2
- data/test/test-validator.rb +36 -869
- data/test/test-validator.yaml +28 -20
- data/test/test-yamlparser.rb +30 -1248
- data/test/test-yamlparser.yaml +138 -110
- data/test/test.rb +33 -13
- data/test/tmp.dir/Context.java +40 -0
- data/test/tmp.dir/Group.java +33 -0
- data/test/tmp.dir/User.java +43 -0
- data/test/tmp.dir/action1.document +18 -0
- data/test/tmp.dir/action1.schema +32 -0
- data/test/tmp.dir/action2.document +18 -0
- data/test/tmp.dir/action2.schema +32 -0
- data/test/tmp.dir/emacs.document +6 -0
- data/test/tmp.dir/emacs.schema +6 -0
- data/test/tmp.dir/meta1.document +0 -0
- data/test/tmp.dir/meta1.schema +3 -0
- data/test/tmp.dir/meta2.document +0 -0
- data/test/tmp.dir/meta2.schema +3 -0
- data/test/tmp.dir/silent1.document +3 -0
- data/test/tmp.dir/silent1.schema +3 -0
- data/test/tmp.dir/silent2.document +7 -0
- data/test/tmp.dir/silent2.schema +3 -0
- data/test/tmp.dir/stream.invalid +8 -0
- data/test/tmp.dir/stream.schema +3 -0
- data/test/tmp.dir/stream.valid +8 -0
- data/test/tmp.dir/untabify.document +5 -0
- data/test/tmp.dir/untabify.schema +10 -0
- metadata +98 -12
- data/lib/kwalify/util/assert-diff.rb +0 -44
@@ -0,0 +1,270 @@
|
|
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</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</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
|
+
<a href="../files/kwalify/main_rb.html">
|
63
|
+
kwalify/main.rb
|
64
|
+
</a>
|
65
|
+
<br />
|
66
|
+
<a href="../files/kwalify/messages_rb.html">
|
67
|
+
kwalify/messages.rb
|
68
|
+
</a>
|
69
|
+
<br />
|
70
|
+
<a href="../files/kwalify/meta-validator_rb.html">
|
71
|
+
kwalify/meta-validator.rb
|
72
|
+
</a>
|
73
|
+
<br />
|
74
|
+
<a href="../files/kwalify/rule_rb.html">
|
75
|
+
kwalify/rule.rb
|
76
|
+
</a>
|
77
|
+
<br />
|
78
|
+
<a href="../files/kwalify/types_rb.html">
|
79
|
+
kwalify/types.rb
|
80
|
+
</a>
|
81
|
+
<br />
|
82
|
+
<a href="../files/kwalify/util/hash-interface_rb.html">
|
83
|
+
kwalify/util/hash-interface.rb
|
84
|
+
</a>
|
85
|
+
<br />
|
86
|
+
<a href="../files/kwalify/validator_rb.html">
|
87
|
+
kwalify/validator.rb
|
88
|
+
</a>
|
89
|
+
<br />
|
90
|
+
<a href="../files/kwalify/yaml-parser_rb.html">
|
91
|
+
kwalify/yaml-parser.rb
|
92
|
+
</a>
|
93
|
+
<br />
|
94
|
+
<a href="../files/kwalify_rb.html">
|
95
|
+
kwalify.rb
|
96
|
+
</a>
|
97
|
+
<br />
|
98
|
+
</td>
|
99
|
+
</tr>
|
100
|
+
|
101
|
+
</table>
|
102
|
+
</div>
|
103
|
+
<!-- banner header -->
|
104
|
+
|
105
|
+
<div id="bodyContent">
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
<div id="contextContent">
|
110
|
+
|
111
|
+
<div id="description">
|
112
|
+
<p>
|
113
|
+
$Rev: 48 $ $Release: 0.6.0 $ copyright(c) 2005 kuwata-lab all rights reserved.
|
114
|
+
</p>
|
115
|
+
|
116
|
+
</div>
|
117
|
+
|
118
|
+
|
119
|
+
</div>
|
120
|
+
|
121
|
+
<div id="method-list">
|
122
|
+
<h3 class="section-bar">Methods</h3>
|
123
|
+
|
124
|
+
<div class="name-list">
|
125
|
+
<a href="#M000007">meta_validator</a>
|
126
|
+
<a href="#M000005">msg</a>
|
127
|
+
<a href="#M000006">word</a>
|
128
|
+
</div>
|
129
|
+
</div>
|
130
|
+
|
131
|
+
</div>
|
132
|
+
|
133
|
+
|
134
|
+
<!-- if includes -->
|
135
|
+
|
136
|
+
<div id="section">
|
137
|
+
|
138
|
+
<div id="class-list">
|
139
|
+
<h3 class="section-bar">Classes and Modules</h3>
|
140
|
+
|
141
|
+
Module <a href="Kwalify/ErrorHelper.html" class="link">Kwalify::ErrorHelper</a><br />
|
142
|
+
Module <a href="Kwalify/HashInterface.html" class="link">Kwalify::HashInterface</a><br />
|
143
|
+
Module <a href="Kwalify/Types.html" class="link">Kwalify::Types</a><br />
|
144
|
+
Class <a href="Kwalify/AssertionError.html" class="link">Kwalify::AssertionError</a><br />
|
145
|
+
Class <a href="Kwalify/BaseError.html" class="link">Kwalify::BaseError</a><br />
|
146
|
+
Class <a href="Kwalify/CommandOptionError.html" class="link">Kwalify::CommandOptionError</a><br />
|
147
|
+
Class <a href="Kwalify/KwalifyError.html" class="link">Kwalify::KwalifyError</a><br />
|
148
|
+
Class <a href="Kwalify/Main.html" class="link">Kwalify::Main</a><br />
|
149
|
+
Class <a href="Kwalify/MetaValidator.html" class="link">Kwalify::MetaValidator</a><br />
|
150
|
+
Class <a href="Kwalify/Parser.html" class="link">Kwalify::Parser</a><br />
|
151
|
+
Class <a href="Kwalify/PlainYamlParser.html" class="link">Kwalify::PlainYamlParser</a><br />
|
152
|
+
Class <a href="Kwalify/Rule.html" class="link">Kwalify::Rule</a><br />
|
153
|
+
Class <a href="Kwalify/SchemaError.html" class="link">Kwalify::SchemaError</a><br />
|
154
|
+
Class <a href="Kwalify/ValidationError.html" class="link">Kwalify::ValidationError</a><br />
|
155
|
+
Class <a href="Kwalify/Validator.html" class="link">Kwalify::Validator</a><br />
|
156
|
+
Class <a href="Kwalify/YamlParser.html" class="link">Kwalify::YamlParser</a><br />
|
157
|
+
Class <a href="Kwalify/YamlSyntaxError.html" class="link">Kwalify::YamlSyntaxError</a><br />
|
158
|
+
|
159
|
+
</div>
|
160
|
+
|
161
|
+
<div id="constants-list">
|
162
|
+
<h3 class="section-bar">Constants</h3>
|
163
|
+
|
164
|
+
<div class="name-list">
|
165
|
+
<table summary="Constants">
|
166
|
+
<tr class="top-aligned-row context-row">
|
167
|
+
<td class="context-item-name">META_VALIDATOR</td>
|
168
|
+
<td>=</td>
|
169
|
+
<td class="context-item-value">MetaValidator.instance()</td>
|
170
|
+
</tr>
|
171
|
+
<tr class="top-aligned-row context-row">
|
172
|
+
<td class="context-item-name">RELEASE</td>
|
173
|
+
<td>=</td>
|
174
|
+
<td class="context-item-value">("$Release: 0.6.0 $" =~ /[.\d]+/) && $&</td>
|
175
|
+
</tr>
|
176
|
+
</table>
|
177
|
+
</div>
|
178
|
+
</div>
|
179
|
+
|
180
|
+
|
181
|
+
|
182
|
+
|
183
|
+
|
184
|
+
|
185
|
+
<!-- if method_list -->
|
186
|
+
<div id="methods">
|
187
|
+
<h3 class="section-bar">Public Class methods</h3>
|
188
|
+
|
189
|
+
<div id="method-M000007" class="method-detail">
|
190
|
+
<a name="M000007"></a>
|
191
|
+
|
192
|
+
<div class="method-heading">
|
193
|
+
<a href="#M000007" class="method-signature">
|
194
|
+
<span class="method-name">meta_validator</span><span class="method-args">(</span>
|
195
|
+
</a>
|
196
|
+
</div>
|
197
|
+
|
198
|
+
<div class="method-description">
|
199
|
+
<p><a class="source-toggle" href="#"
|
200
|
+
onclick="toggleCode('M000007-source');return false;">[Source]</a></p>
|
201
|
+
<div class="method-source-code" id="M000007-source">
|
202
|
+
<pre>
|
203
|
+
<span class="ruby-comment cmt"># File kwalify/meta-validator.rb, line 352</span>
|
204
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">meta_validator</span> <span class="ruby-comment cmt"># obsolete</span>
|
205
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-constant">META_VALIDATOR</span>
|
206
|
+
<span class="ruby-keyword kw">end</span>
|
207
|
+
</pre>
|
208
|
+
</div>
|
209
|
+
</div>
|
210
|
+
</div>
|
211
|
+
|
212
|
+
<div id="method-M000005" class="method-detail">
|
213
|
+
<a name="M000005"></a>
|
214
|
+
|
215
|
+
<div class="method-heading">
|
216
|
+
<a href="#M000005" class="method-signature">
|
217
|
+
<span class="method-name">msg</span><span class="method-args">(key)</span>
|
218
|
+
</a>
|
219
|
+
</div>
|
220
|
+
|
221
|
+
<div class="method-description">
|
222
|
+
<p><a class="source-toggle" href="#"
|
223
|
+
onclick="toggleCode('M000005-source');return false;">[Source]</a></p>
|
224
|
+
<div class="method-source-code" id="M000005-source">
|
225
|
+
<pre>
|
226
|
+
<span class="ruby-comment cmt"># File kwalify/messages.rb, line 11</span>
|
227
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">msg</span>(<span class="ruby-identifier">key</span>)
|
228
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@@messages</span>[<span class="ruby-identifier">key</span>]
|
229
|
+
<span class="ruby-keyword kw">end</span>
|
230
|
+
</pre>
|
231
|
+
</div>
|
232
|
+
</div>
|
233
|
+
</div>
|
234
|
+
|
235
|
+
<div id="method-M000006" class="method-detail">
|
236
|
+
<a name="M000006"></a>
|
237
|
+
|
238
|
+
<div class="method-heading">
|
239
|
+
<a href="#M000006" class="method-signature">
|
240
|
+
<span class="method-name">word</span><span class="method-args">(key)</span>
|
241
|
+
</a>
|
242
|
+
</div>
|
243
|
+
|
244
|
+
<div class="method-description">
|
245
|
+
<p><a class="source-toggle" href="#"
|
246
|
+
onclick="toggleCode('M000006-source');return false;">[Source]</a></p>
|
247
|
+
<div class="method-source-code" id="M000006-source">
|
248
|
+
<pre>
|
249
|
+
<span class="ruby-comment cmt"># File kwalify/messages.rb, line 150</span>
|
250
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">word</span>(<span class="ruby-identifier">key</span>)
|
251
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@@words</span>[<span class="ruby-identifier">key</span>] <span class="ruby-operator">||</span> <span class="ruby-identifier">key</span>
|
252
|
+
<span class="ruby-keyword kw">end</span>
|
253
|
+
</pre>
|
254
|
+
</div>
|
255
|
+
</div>
|
256
|
+
</div>
|
257
|
+
|
258
|
+
|
259
|
+
</div>
|
260
|
+
|
261
|
+
|
262
|
+
</div>
|
263
|
+
|
264
|
+
|
265
|
+
<div id="validator-badges">
|
266
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
267
|
+
</div>
|
268
|
+
|
269
|
+
</body>
|
270
|
+
</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::AssertionError</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::AssertionError</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="KwalifyError.html">
|
69
|
+
KwalifyError
|
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="#M000062">new</a>
|
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-M000062" class="method-detail">
|
114
|
+
<a name="M000062"></a>
|
115
|
+
|
116
|
+
<div class="method-heading">
|
117
|
+
<a href="#M000062" class="method-signature">
|
118
|
+
<span class="method-name">new</span><span class="method-args">(msg)</span>
|
119
|
+
</a>
|
120
|
+
</div>
|
121
|
+
|
122
|
+
<div class="method-description">
|
123
|
+
<p><a class="source-toggle" href="#"
|
124
|
+
onclick="toggleCode('M000062-source');return false;">[Source]</a></p>
|
125
|
+
<div class="method-source-code" id="M000062-source">
|
126
|
+
<pre>
|
127
|
+
<span class="ruby-comment cmt"># File kwalify/errors.rb, line 16</span>
|
128
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">msg</span>)
|
129
|
+
<span class="ruby-keyword kw">super</span>(<span class="ruby-value str">"*** assertion error: "</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">msg</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,296 @@
|
|
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::BaseError</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::BaseError</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="KwalifyError.html">
|
69
|
+
KwalifyError
|
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="#M000035"><=></a>
|
92
|
+
<a href="#M000033">message</a>
|
93
|
+
<a href="#M000031">new</a>
|
94
|
+
<a href="#M000032">path</a>
|
95
|
+
<a href="#M000034">to_s</a>
|
96
|
+
</div>
|
97
|
+
</div>
|
98
|
+
|
99
|
+
</div>
|
100
|
+
|
101
|
+
|
102
|
+
<!-- if includes -->
|
103
|
+
|
104
|
+
<div id="section">
|
105
|
+
|
106
|
+
|
107
|
+
|
108
|
+
<div id="aliases-list">
|
109
|
+
<h3 class="section-bar">External Aliases</h3>
|
110
|
+
|
111
|
+
<div class="name-list">
|
112
|
+
<table summary="aliases">
|
113
|
+
<tr class="top-aligned-row context-row">
|
114
|
+
<td class="context-item-name">to_s</td>
|
115
|
+
<td>-></td>
|
116
|
+
<td class="context-item-value">_to_s</td>
|
117
|
+
</tr>
|
118
|
+
</table>
|
119
|
+
</div>
|
120
|
+
</div>
|
121
|
+
|
122
|
+
|
123
|
+
<div id="attribute-list">
|
124
|
+
<h3 class="section-bar">Attributes</h3>
|
125
|
+
|
126
|
+
<div class="name-list">
|
127
|
+
<table>
|
128
|
+
<tr class="top-aligned-row context-row">
|
129
|
+
<td class="context-item-name">error_symbol</td>
|
130
|
+
<td class="context-item-value"> [R] </td>
|
131
|
+
<td class="context-item-desc"></td>
|
132
|
+
</tr>
|
133
|
+
<tr class="top-aligned-row context-row">
|
134
|
+
<td class="context-item-name">linenum</td>
|
135
|
+
<td class="context-item-value"> [RW] </td>
|
136
|
+
<td class="context-item-desc"></td>
|
137
|
+
</tr>
|
138
|
+
<tr class="top-aligned-row context-row">
|
139
|
+
<td class="context-item-name">path</td>
|
140
|
+
<td class="context-item-value"> [R] </td>
|
141
|
+
<td class="context-item-desc"></td>
|
142
|
+
</tr>
|
143
|
+
<tr class="top-aligned-row context-row">
|
144
|
+
<td class="context-item-name">rule</td>
|
145
|
+
<td class="context-item-value"> [R] </td>
|
146
|
+
<td class="context-item-desc"></td>
|
147
|
+
</tr>
|
148
|
+
<tr class="top-aligned-row context-row">
|
149
|
+
<td class="context-item-name">value</td>
|
150
|
+
<td class="context-item-value"> [R] </td>
|
151
|
+
<td class="context-item-desc"></td>
|
152
|
+
</tr>
|
153
|
+
</table>
|
154
|
+
</div>
|
155
|
+
</div>
|
156
|
+
|
157
|
+
|
158
|
+
|
159
|
+
<!-- if method_list -->
|
160
|
+
<div id="methods">
|
161
|
+
<h3 class="section-bar">Public Class methods</h3>
|
162
|
+
|
163
|
+
<div id="method-M000031" class="method-detail">
|
164
|
+
<a name="M000031"></a>
|
165
|
+
|
166
|
+
<div class="method-heading">
|
167
|
+
<a href="#M000031" class="method-signature">
|
168
|
+
<span class="method-name">new</span><span class="method-args">(message="", path=nil, value=nil, rule=nil, error_symbol=nil)</span>
|
169
|
+
</a>
|
170
|
+
</div>
|
171
|
+
|
172
|
+
<div class="method-description">
|
173
|
+
<p><a class="source-toggle" href="#"
|
174
|
+
onclick="toggleCode('M000031-source');return false;">[Source]</a></p>
|
175
|
+
<div class="method-source-code" id="M000031-source">
|
176
|
+
<pre>
|
177
|
+
<span class="ruby-comment cmt"># File kwalify/errors.rb, line 23</span>
|
178
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">message</span>=<span class="ruby-value str">""</span>, <span class="ruby-identifier">path</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">rule</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">error_symbol</span>=<span class="ruby-keyword kw">nil</span>)
|
179
|
+
<span class="ruby-keyword kw">super</span>(<span class="ruby-identifier">message</span>)
|
180
|
+
<span class="ruby-ivar">@path</span> = <span class="ruby-identifier">path</span>
|
181
|
+
<span class="ruby-ivar">@rule</span> = <span class="ruby-identifier">rule</span>
|
182
|
+
<span class="ruby-ivar">@value</span> = <span class="ruby-identifier">value</span>
|
183
|
+
<span class="ruby-ivar">@error_symbol</span> = <span class="ruby-identifier">error_symbol</span>
|
184
|
+
<span class="ruby-keyword kw">end</span>
|
185
|
+
</pre>
|
186
|
+
</div>
|
187
|
+
</div>
|
188
|
+
</div>
|
189
|
+
|
190
|
+
<h3 class="section-bar">Public Instance methods</h3>
|
191
|
+
|
192
|
+
<div id="method-M000035" class="method-detail">
|
193
|
+
<a name="M000035"></a>
|
194
|
+
|
195
|
+
<div class="method-heading">
|
196
|
+
<a href="#M000035" class="method-signature">
|
197
|
+
<span class="method-name"><=></span><span class="method-args">(ex)</span>
|
198
|
+
</a>
|
199
|
+
</div>
|
200
|
+
|
201
|
+
<div class="method-description">
|
202
|
+
<p><a class="source-toggle" href="#"
|
203
|
+
onclick="toggleCode('M000035-source');return false;">[Source]</a></p>
|
204
|
+
<div class="method-source-code" id="M000035-source">
|
205
|
+
<pre>
|
206
|
+
<span class="ruby-comment cmt"># File kwalify/errors.rb, line 47</span>
|
207
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-operator"><=></span>(<span class="ruby-identifier">ex</span>)
|
208
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@linenum</span> <span class="ruby-operator"><=></span> <span class="ruby-identifier">ex</span>.<span class="ruby-identifier">linenum</span>
|
209
|
+
<span class="ruby-keyword kw">end</span>
|
210
|
+
</pre>
|
211
|
+
</div>
|
212
|
+
</div>
|
213
|
+
</div>
|
214
|
+
|
215
|
+
<div id="method-M000033" class="method-detail">
|
216
|
+
<a name="M000033"></a>
|
217
|
+
|
218
|
+
<div class="method-heading">
|
219
|
+
<a href="#M000033" class="method-signature">
|
220
|
+
<span class="method-name">message</span><span class="method-args">()</span>
|
221
|
+
</a>
|
222
|
+
</div>
|
223
|
+
|
224
|
+
<div class="method-description">
|
225
|
+
<p><a class="source-toggle" href="#"
|
226
|
+
onclick="toggleCode('M000033-source');return false;">[Source]</a></p>
|
227
|
+
<div class="method-source-code" id="M000033-source">
|
228
|
+
<pre>
|
229
|
+
<span class="ruby-comment cmt"># File kwalify/errors.rb, line 39</span>
|
230
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">message</span>
|
231
|
+
<span class="ruby-identifier">_to_s</span>
|
232
|
+
<span class="ruby-keyword kw">end</span>
|
233
|
+
</pre>
|
234
|
+
</div>
|
235
|
+
</div>
|
236
|
+
</div>
|
237
|
+
|
238
|
+
<div id="method-M000032" class="method-detail">
|
239
|
+
<a name="M000032"></a>
|
240
|
+
|
241
|
+
<div class="method-heading">
|
242
|
+
<a href="#M000032" class="method-signature">
|
243
|
+
<span class="method-name">path</span><span class="method-args">()</span>
|
244
|
+
</a>
|
245
|
+
</div>
|
246
|
+
|
247
|
+
<div class="method-description">
|
248
|
+
<p><a class="source-toggle" href="#"
|
249
|
+
onclick="toggleCode('M000032-source');return false;">[Source]</a></p>
|
250
|
+
<div class="method-source-code" id="M000032-source">
|
251
|
+
<pre>
|
252
|
+
<span class="ruby-comment cmt"># File kwalify/errors.rb, line 33</span>
|
253
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">path</span>
|
254
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@path</span> <span class="ruby-operator">==</span> <span class="ruby-value str">''</span> <span class="ruby-operator">?</span> <span class="ruby-value str">"/"</span> <span class="ruby-operator">:</span> <span class="ruby-ivar">@path</span>
|
255
|
+
<span class="ruby-keyword kw">end</span>
|
256
|
+
</pre>
|
257
|
+
</div>
|
258
|
+
</div>
|
259
|
+
</div>
|
260
|
+
|
261
|
+
<div id="method-M000034" class="method-detail">
|
262
|
+
<a name="M000034"></a>
|
263
|
+
|
264
|
+
<div class="method-heading">
|
265
|
+
<a href="#M000034" class="method-signature">
|
266
|
+
<span class="method-name">to_s</span><span class="method-args">()</span>
|
267
|
+
</a>
|
268
|
+
</div>
|
269
|
+
|
270
|
+
<div class="method-description">
|
271
|
+
<p><a class="source-toggle" href="#"
|
272
|
+
onclick="toggleCode('M000034-source');return false;">[Source]</a></p>
|
273
|
+
<div class="method-source-code" id="M000034-source">
|
274
|
+
<pre>
|
275
|
+
<span class="ruby-comment cmt"># File kwalify/errors.rb, line 43</span>
|
276
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_s</span>
|
277
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-node">"[#{path()}] #{message()}"</span>
|
278
|
+
<span class="ruby-keyword kw">end</span>
|
279
|
+
</pre>
|
280
|
+
</div>
|
281
|
+
</div>
|
282
|
+
</div>
|
283
|
+
|
284
|
+
|
285
|
+
</div>
|
286
|
+
|
287
|
+
|
288
|
+
</div>
|
289
|
+
|
290
|
+
|
291
|
+
<div id="validator-badges">
|
292
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
293
|
+
</div>
|
294
|
+
|
295
|
+
</body>
|
296
|
+
</html>
|