schemacop 2.0.0 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +1 -17
  3. data/.travis.yml +0 -2
  4. data/CHANGELOG.md +6 -0
  5. data/README.md +6 -3
  6. data/VERSION +1 -1
  7. data/doc/Schemacop/ArrayValidator.html +1 -1
  8. data/doc/Schemacop/BooleanValidator.html +1 -1
  9. data/doc/Schemacop/Collector.html +1 -1
  10. data/doc/Schemacop/Exceptions/InvalidSchemaError.html +1 -1
  11. data/doc/Schemacop/Exceptions/ValidationError.html +1 -1
  12. data/doc/Schemacop/Exceptions.html +1 -1
  13. data/doc/Schemacop/FieldNode.html +1 -1
  14. data/doc/Schemacop/FloatValidator.html +1 -1
  15. data/doc/Schemacop/HashValidator.html +1 -1
  16. data/doc/Schemacop/IntegerValidator.html +1 -1
  17. data/doc/Schemacop/NilValidator.html +1 -1
  18. data/doc/Schemacop/Node.html +2 -2
  19. data/doc/Schemacop/NodeResolver.html +1 -1
  20. data/doc/Schemacop/NodeSupportingField.html +1 -1
  21. data/doc/Schemacop/NodeSupportingType.html +1 -1
  22. data/doc/Schemacop/NodeWithBlock.html +1 -1
  23. data/doc/Schemacop/NumberValidator.html +1 -1
  24. data/doc/Schemacop/ObjectValidator.html +1 -1
  25. data/doc/Schemacop/RootNode.html +1 -1
  26. data/doc/Schemacop/Schema.html +1 -1
  27. data/doc/Schemacop/StringValidator.html +1 -1
  28. data/doc/Schemacop/SymbolValidator.html +145 -0
  29. data/doc/Schemacop.html +3 -3
  30. data/doc/ScopedEnv.html +1 -1
  31. data/doc/_index.html +8 -1
  32. data/doc/class_list.html +1 -1
  33. data/doc/file.README.html +5 -4
  34. data/doc/index.html +5 -4
  35. data/doc/top-level-namespace.html +1 -1
  36. data/lib/schemacop/node_supporting_field.rb +2 -4
  37. data/lib/schemacop/validator/symbol_validator.rb +5 -0
  38. data/lib/schemacop.rb +1 -0
  39. data/schemacop.gemspec +5 -5
  40. data/test/types_test.rb +1 -0
  41. data/test/validator_symbol_test.rb +16 -0
  42. metadata +6 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 57fd66ee6db934d9c0c2026d2d9dab992d777b01
4
- data.tar.gz: 27cda8b63a0962684c0f815145aa5e3fba9f3f6c
3
+ metadata.gz: bb096c541a2c7681a8e46331b266f0e6d93e8946
4
+ data.tar.gz: 2aead692c31d0eea58cc0bcc5f239cb03edcf322
5
5
  SHA512:
6
- metadata.gz: 9fe380ead2ad62aa1d12171a49e1ca7d3ff3019d3c4839448818e724892e2d611702146cea0f12a5671a04db2ad98345a252da60d5aa8e9412e551112a2eb635
7
- data.tar.gz: 3deefe749765e7e662f5878175ec9f1cb3aaebbd892c5d45ba0dd9b044bb6fd12baafd2ee22c13a5dc13e18d226ccd51d214b3830d96d2c15d0efe581c0a40ef
6
+ metadata.gz: 156d68d30297a571819a9bc9c4e2ca2fe7e10bfcbe01c79d13393de506a4b27e4e6d1faf07021cda33a05ebcf7b8cefb046efcbf325e3fd248ad272271d5ce6a
7
+ data.tar.gz: 7057102772faed1465753810c013b3a8ea29f0c78d03128af0f6920dce56492de7835571716ba083a4bb48c9edece13ef0f3e364b25575753937855c2209e6b1
data/.rubocop.yml CHANGED
@@ -1,6 +1,4 @@
1
1
  AllCops:
2
- TargetRubyVersion: 2.3
3
-
4
2
  Exclude:
5
3
  - 'local/**/*'
6
4
  - 'vendor/**/*'
@@ -10,21 +8,13 @@ AllCops:
10
8
  - 'db/schema.rb'
11
9
  - 'locale/translations.rb'
12
10
  - 'lib/scratch.rb'
11
+ - 'schemacop.gemspec'
13
12
 
14
13
  DisplayCopNames: true
15
14
 
16
- Style/FrozenStringLiteralComment:
17
- Enabled: false
18
-
19
15
  Style/SignalException:
20
16
  EnforcedStyle: only_fail
21
17
 
22
- Style/ConditionalAssignment:
23
- Enabled: false
24
-
25
- Style/IndentArray:
26
- EnforcedStyle: consistent
27
-
28
18
  Metrics/MethodLength:
29
19
  Enabled: false
30
20
 
@@ -53,9 +43,6 @@ Metrics/LineLength:
53
43
  Metrics/BlockNesting:
54
44
  Enabled: false
55
45
 
56
- Metrics/BlockLength:
57
- Enabled: false
58
-
59
46
  Style/IfUnlessModifier:
60
47
  Enabled: false
61
48
 
@@ -93,8 +80,5 @@ Style/ClassAndModuleChildren:
93
80
  #
94
81
  # The compact style is only forced, for classes / modules with one child.
95
82
 
96
- Style/NumericPredicate:
97
- Enabled: false
98
-
99
83
  Style/FormatString:
100
84
  Enabled: false
data/.travis.yml CHANGED
@@ -1,7 +1,5 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.0
4
- - 2.2
5
3
  - 2.3.0
6
4
  script:
7
5
  - bundle install
data/CHANGELOG.md CHANGED
@@ -10,6 +10,12 @@
10
10
  ### Changes
11
11
  -->
12
12
 
13
+ ## 2.1.0 (2017-05-16)
14
+
15
+ ### New features
16
+
17
+ * Validator for type Symbol, accessible with the symbol `:symbol`
18
+
13
19
  ## 2.0.0 (2017-05-15)
14
20
 
15
21
  ### Changes
data/README.md CHANGED
@@ -275,9 +275,10 @@ there are plenty of short forms available which we will see below.
275
275
 
276
276
  ## Types
277
277
 
278
- The following types are supported by Schemacop:
279
- <!-- TODO: Test the following statement: (you can easily extend them by writing
280
- another `your_validator.rb` class under `validator/`): -->
278
+ Types are defined via their validators, which is a class under `validator/`.
279
+ Each validator is sourced by `schemacop.rb`.
280
+
281
+ The following types are supported by Schemacop by default:
281
282
 
282
283
  * `:boolean` accepts a Ruby TrueClass or FalseClass instance.
283
284
 
@@ -297,6 +298,8 @@ another `your_validator.rb` class under `validator/`): -->
297
298
 
298
299
  - supported options: `min`, `max` (bounds for string length)
299
300
 
301
+ * `:symbol` accepts a Ruby Symbol.
302
+
300
303
  * `:object` accepts an arbitrary Ruby object (any object if no option is given).
301
304
 
302
305
  - supported option: `classes`: Ruby class (or an array of them) that will be
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.0.0
1
+ 2.1.0
@@ -319,7 +319,7 @@
319
319
  </div>
320
320
 
321
321
  <div id="footer">
322
- Generated on Mon May 15 17:46:05 2017 by
322
+ Generated on Tue May 16 11:56:25 2017 by
323
323
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
324
324
  0.9.9 (ruby-2.3.1).
325
325
  </div>
@@ -135,7 +135,7 @@
135
135
  </div>
136
136
 
137
137
  <div id="footer">
138
- Generated on Mon May 15 17:46:05 2017 by
138
+ Generated on Tue May 16 11:56:25 2017 by
139
139
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
140
140
  0.9.9 (ruby-2.3.1).
141
141
  </div>
@@ -525,7 +525,7 @@
525
525
  </div>
526
526
 
527
527
  <div id="footer">
528
- Generated on Mon May 15 17:46:05 2017 by
528
+ Generated on Tue May 16 11:56:24 2017 by
529
529
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
530
530
  0.9.9 (ruby-2.3.1).
531
531
  </div>
@@ -114,7 +114,7 @@
114
114
  </div>
115
115
 
116
116
  <div id="footer">
117
- Generated on Mon May 15 17:46:05 2017 by
117
+ Generated on Tue May 16 11:56:24 2017 by
118
118
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
119
119
  0.9.9 (ruby-2.3.1).
120
120
  </div>
@@ -114,7 +114,7 @@
114
114
  </div>
115
115
 
116
116
  <div id="footer">
117
- Generated on Mon May 15 17:46:05 2017 by
117
+ Generated on Tue May 16 11:56:24 2017 by
118
118
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
119
119
  0.9.9 (ruby-2.3.1).
120
120
  </div>
@@ -105,7 +105,7 @@
105
105
  </div>
106
106
 
107
107
  <div id="footer">
108
- Generated on Mon May 15 17:46:05 2017 by
108
+ Generated on Tue May 16 11:56:24 2017 by
109
109
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
110
110
  0.9.9 (ruby-2.3.1).
111
111
  </div>
@@ -399,7 +399,7 @@
399
399
  </div>
400
400
 
401
401
  <div id="footer">
402
- Generated on Mon May 15 17:46:05 2017 by
402
+ Generated on Tue May 16 11:56:24 2017 by
403
403
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
404
404
  0.9.9 (ruby-2.3.1).
405
405
  </div>
@@ -148,7 +148,7 @@
148
148
  </div>
149
149
 
150
150
  <div id="footer">
151
- Generated on Mon May 15 17:46:05 2017 by
151
+ Generated on Tue May 16 11:56:25 2017 by
152
152
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
153
153
  0.9.9 (ruby-2.3.1).
154
154
  </div>
@@ -253,7 +253,7 @@
253
253
  </div>
254
254
 
255
255
  <div id="footer">
256
- Generated on Mon May 15 17:46:05 2017 by
256
+ Generated on Tue May 16 11:56:25 2017 by
257
257
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
258
258
  0.9.9 (ruby-2.3.1).
259
259
  </div>
@@ -148,7 +148,7 @@
148
148
  </div>
149
149
 
150
150
  <div id="footer">
151
- Generated on Mon May 15 17:46:05 2017 by
151
+ Generated on Tue May 16 11:56:25 2017 by
152
152
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
153
153
  0.9.9 (ruby-2.3.1).
154
154
  </div>
@@ -135,7 +135,7 @@
135
135
  </div>
136
136
 
137
137
  <div id="footer">
138
- Generated on Mon May 15 17:46:05 2017 by
138
+ Generated on Tue May 16 11:56:24 2017 by
139
139
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
140
140
  0.9.9 (ruby-2.3.1).
141
141
  </div>
@@ -101,7 +101,7 @@
101
101
 
102
102
  <div id="subclasses">
103
103
  <h2>Direct Known Subclasses</h2>
104
- <p class="children"><span class='object_link'><a href="BooleanValidator.html" title="Schemacop::BooleanValidator (class)">BooleanValidator</a></span>, <span class='object_link'><a href="NilValidator.html" title="Schemacop::NilValidator (class)">NilValidator</a></span>, <span class='object_link'><a href="NodeWithBlock.html" title="Schemacop::NodeWithBlock (class)">NodeWithBlock</a></span>, <span class='object_link'><a href="NumberValidator.html" title="Schemacop::NumberValidator (class)">NumberValidator</a></span>, <span class='object_link'><a href="ObjectValidator.html" title="Schemacop::ObjectValidator (class)">ObjectValidator</a></span>, <span class='object_link'><a href="StringValidator.html" title="Schemacop::StringValidator (class)">StringValidator</a></span></p>
104
+ <p class="children"><span class='object_link'><a href="BooleanValidator.html" title="Schemacop::BooleanValidator (class)">BooleanValidator</a></span>, <span class='object_link'><a href="NilValidator.html" title="Schemacop::NilValidator (class)">NilValidator</a></span>, <span class='object_link'><a href="NodeWithBlock.html" title="Schemacop::NodeWithBlock (class)">NodeWithBlock</a></span>, <span class='object_link'><a href="NumberValidator.html" title="Schemacop::NumberValidator (class)">NumberValidator</a></span>, <span class='object_link'><a href="ObjectValidator.html" title="Schemacop::ObjectValidator (class)">ObjectValidator</a></span>, <span class='object_link'><a href="StringValidator.html" title="Schemacop::StringValidator (class)">StringValidator</a></span>, <span class='object_link'><a href="SymbolValidator.html" title="Schemacop::SymbolValidator (class)">SymbolValidator</a></span></p>
105
105
  </div>
106
106
 
107
107
 
@@ -1416,7 +1416,7 @@
1416
1416
  </div>
1417
1417
 
1418
1418
  <div id="footer">
1419
- Generated on Mon May 15 17:46:05 2017 by
1419
+ Generated on Tue May 16 11:56:24 2017 by
1420
1420
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1421
1421
  0.9.9 (ruby-2.3.1).
1422
1422
  </div>
@@ -232,7 +232,7 @@
232
232
  </div>
233
233
 
234
234
  <div id="footer">
235
- Generated on Mon May 15 17:46:05 2017 by
235
+ Generated on Tue May 16 11:56:24 2017 by
236
236
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
237
237
  0.9.9 (ruby-2.3.1).
238
238
  </div>
@@ -580,7 +580,7 @@
580
580
  </div>
581
581
 
582
582
  <div id="footer">
583
- Generated on Mon May 15 17:46:05 2017 by
583
+ Generated on Tue May 16 11:56:24 2017 by
584
584
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
585
585
  0.9.9 (ruby-2.3.1).
586
586
  </div>
@@ -604,7 +604,7 @@ as it formerly was the case in the constructor.</p>
604
604
  </div>
605
605
 
606
606
  <div id="footer">
607
- Generated on Mon May 15 17:46:05 2017 by
607
+ Generated on Tue May 16 11:56:24 2017 by
608
608
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
609
609
  0.9.9 (ruby-2.3.1).
610
610
  </div>
@@ -279,7 +279,7 @@
279
279
  </div>
280
280
 
281
281
  <div id="footer">
282
- Generated on Mon May 15 17:46:05 2017 by
282
+ Generated on Tue May 16 11:56:24 2017 by
283
283
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
284
284
  0.9.9 (ruby-2.3.1).
285
285
  </div>
@@ -222,7 +222,7 @@
222
222
  </div>
223
223
 
224
224
  <div id="footer">
225
- Generated on Mon May 15 17:46:05 2017 by
225
+ Generated on Tue May 16 11:56:25 2017 by
226
226
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
227
227
  0.9.9 (ruby-2.3.1).
228
228
  </div>
@@ -278,7 +278,7 @@
278
278
  </div>
279
279
 
280
280
  <div id="footer">
281
- Generated on Mon May 15 17:46:05 2017 by
281
+ Generated on Tue May 16 11:56:25 2017 by
282
282
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
283
283
  0.9.9 (ruby-2.3.1).
284
284
  </div>
@@ -161,7 +161,7 @@
161
161
  </div>
162
162
 
163
163
  <div id="footer">
164
- Generated on Mon May 15 17:46:05 2017 by
164
+ Generated on Tue May 16 11:56:24 2017 by
165
165
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
166
166
  0.9.9 (ruby-2.3.1).
167
167
  </div>
@@ -687,7 +687,7 @@ this exception is thrown.</p>
687
687
  </div>
688
688
 
689
689
  <div id="footer">
690
- Generated on Mon May 15 17:46:05 2017 by
690
+ Generated on Tue May 16 11:56:24 2017 by
691
691
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
692
692
  0.9.9 (ruby-2.3.1).
693
693
  </div>
@@ -285,7 +285,7 @@
285
285
  </div>
286
286
 
287
287
  <div id="footer">
288
- Generated on Mon May 15 17:46:05 2017 by
288
+ Generated on Tue May 16 11:56:25 2017 by
289
289
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
290
290
  0.9.9 (ruby-2.3.1).
291
291
  </div>
@@ -0,0 +1,145 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>
7
+ Class: Schemacop::SymbolValidator
8
+
9
+ &mdash; Documentation by YARD 0.9.9
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ pathId = "Schemacop::SymbolValidator";
19
+ relpath = '../';
20
+ </script>
21
+
22
+
23
+ <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
24
+
25
+ <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
26
+
27
+
28
+ </head>
29
+ <body>
30
+ <div class="nav_wrap">
31
+ <iframe id="nav" src="../class_list.html?1"></iframe>
32
+ <div id="resizer"></div>
33
+ </div>
34
+
35
+ <div id="main" tabindex="-1">
36
+ <div id="header">
37
+ <div id="menu">
38
+
39
+ <a href="../_index.html">Index (S)</a> &raquo;
40
+ <span class='title'><span class='object_link'><a href="../Schemacop.html" title="Schemacop (module)">Schemacop</a></span></span>
41
+ &raquo;
42
+ <span class="title">SymbolValidator</span>
43
+
44
+ </div>
45
+
46
+ <div id="search">
47
+
48
+ <a class="full_list_link" id="class_list_link"
49
+ href="../class_list.html">
50
+
51
+ <svg width="24" height="24">
52
+ <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
+ <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
+ <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
+ </svg>
56
+ </a>
57
+
58
+ </div>
59
+ <div class="clear"></div>
60
+ </div>
61
+
62
+ <div id="content"><h1>Class: Schemacop::SymbolValidator
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+ <dl>
70
+ <dt>Inherits:</dt>
71
+ <dd>
72
+ <span class="inheritName"><span class='object_link'><a href="Node.html" title="Schemacop::Node (class)">Node</a></span></span>
73
+
74
+ <ul class="fullTree">
75
+ <li>Object</li>
76
+
77
+ <li class="next"><span class='object_link'><a href="Node.html" title="Schemacop::Node (class)">Node</a></span></li>
78
+
79
+ <li class="next">Schemacop::SymbolValidator</li>
80
+
81
+ </ul>
82
+ <a href="#" class="inheritanceTree">show all</a>
83
+
84
+ </dd>
85
+ </dl>
86
+
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+ <dl>
98
+ <dt>Defined in:</dt>
99
+ <dd>lib/schemacop/validator/symbol_validator.rb</dd>
100
+ </dl>
101
+
102
+ </div>
103
+
104
+
105
+
106
+
107
+
108
+
109
+
110
+ <h2>Instance Attribute Summary</h2>
111
+
112
+ <h3 class="inherited">Attributes inherited from <span class='object_link'><a href="Node.html" title="Schemacop::Node (class)">Node</a></span></h3>
113
+ <p class="inherited"><span class='object_link'><a href="Node.html#options-instance_method" title="Schemacop::Node#options (method)">#options</a></span></p>
114
+
115
+
116
+
117
+
118
+
119
+
120
+
121
+
122
+
123
+ <h2>Method Summary</h2>
124
+
125
+ <h3 class="inherited">Methods inherited from <span class='object_link'><a href="Node.html" title="Schemacop::Node (class)">Node</a></span></h3>
126
+ <p class="inherited"><span class='object_link'><a href="Node.html#build-class_method" title="Schemacop::Node.build (method)">build</a></span>, <span class='object_link'><a href="Node.html#class_matches%3F-class_method" title="Schemacop::Node.class_matches? (method)">class_matches?</a></span>, <span class='object_link'><a href="Node.html#clear_klasses-class_method" title="Schemacop::Node.clear_klasses (method)">clear_klasses</a></span>, <span class='object_link'><a href="Node.html#clear_symbols-class_method" title="Schemacop::Node.clear_symbols (method)">clear_symbols</a></span>, <span class='object_link'><a href="Node.html#exec_block-instance_method" title="Schemacop::Node#exec_block (method)">#exec_block</a></span>, <span class='object_link'><a href="Node.html#initialize-instance_method" title="Schemacop::Node#initialize (method)">#initialize</a></span>, <span class='object_link'><a href="Node.html#klass-class_method" title="Schemacop::Node.klass (method)">klass</a></span>, <span class='object_link'><a href="Node.html#option-class_method" title="Schemacop::Node.option (method)">option</a></span>, <span class='object_link'><a href="Node.html#option-instance_method" title="Schemacop::Node#option (method)">#option</a></span>, <span class='object_link'><a href="Node.html#option%3F-instance_method" title="Schemacop::Node#option? (method)">#option?</a></span>, <span class='object_link'><a href="Node.html#register-class_method" title="Schemacop::Node.register (method)">register</a></span>, <span class='object_link'><a href="Node.html#resolve_type_klass-instance_method" title="Schemacop::Node#resolve_type_klass (method)">#resolve_type_klass</a></span>, <span class='object_link'><a href="Node.html#symbol-class_method" title="Schemacop::Node.symbol (method)">symbol</a></span>, <span class='object_link'><a href="Node.html#symbol_matches%3F-class_method" title="Schemacop::Node.symbol_matches? (method)">symbol_matches?</a></span>, <span class='object_link'><a href="Node.html#type_filter_matches%3F-instance_method" title="Schemacop::Node#type_filter_matches? (method)">#type_filter_matches?</a></span>, <span class='object_link'><a href="Node.html#type_label-instance_method" title="Schemacop::Node#type_label (method)">#type_label</a></span>, <span class='object_link'><a href="Node.html#type_matches%3F-class_method" title="Schemacop::Node.type_matches? (method)">type_matches?</a></span>, <span class='object_link'><a href="Node.html#type_matches%3F-instance_method" title="Schemacop::Node#type_matches? (method)">#type_matches?</a></span>, <span class='object_link'><a href="Node.html#validate-instance_method" title="Schemacop::Node#validate (method)">#validate</a></span></p>
127
+ <div id="constructor_details" class="method_details_list">
128
+ <h2>Constructor Details</h2>
129
+
130
+ <p class="notice">This class inherits a constructor from <span class='object_link'><a href="Node.html#initialize-instance_method" title="Schemacop::Node#initialize (method)">Schemacop::Node</a></span></p>
131
+
132
+ </div>
133
+
134
+
135
+ </div>
136
+
137
+ <div id="footer">
138
+ Generated on Tue May 16 11:56:25 2017 by
139
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
140
+ 0.9.9 (ruby-2.3.1).
141
+ </div>
142
+
143
+ </div>
144
+ </body>
145
+ </html>
data/doc/Schemacop.html CHANGED
@@ -79,7 +79,7 @@
79
79
  <dl>
80
80
  <dt>Defined in:</dt>
81
81
  <dd>lib/schemacop.rb<span class="defines">,<br />
82
- lib/schemacop/node.rb,<br /> lib/schemacop/schema.rb,<br /> lib/schemacop/collector.rb,<br /> lib/schemacop/root_node.rb,<br /> lib/schemacop/field_node.rb,<br /> lib/schemacop/node_resolver.rb,<br /> lib/schemacop/node_with_block.rb,<br /> lib/schemacop/node_supporting_type.rb,<br /> lib/schemacop/node_supporting_field.rb,<br /> lib/schemacop/validator/nil_validator.rb,<br /> lib/schemacop/validator/hash_validator.rb,<br /> lib/schemacop/validator/array_validator.rb,<br /> lib/schemacop/validator/float_validator.rb,<br /> lib/schemacop/validator/number_validator.rb,<br /> lib/schemacop/validator/object_validator.rb,<br /> lib/schemacop/validator/string_validator.rb,<br /> lib/schemacop/validator/boolean_validator.rb,<br /> lib/schemacop/validator/integer_validator.rb</span>
82
+ lib/schemacop/node.rb,<br /> lib/schemacop/schema.rb,<br /> lib/schemacop/collector.rb,<br /> lib/schemacop/root_node.rb,<br /> lib/schemacop/field_node.rb,<br /> lib/schemacop/node_resolver.rb,<br /> lib/schemacop/node_with_block.rb,<br /> lib/schemacop/node_supporting_type.rb,<br /> lib/schemacop/node_supporting_field.rb,<br /> lib/schemacop/validator/nil_validator.rb,<br /> lib/schemacop/validator/hash_validator.rb,<br /> lib/schemacop/validator/array_validator.rb,<br /> lib/schemacop/validator/float_validator.rb,<br /> lib/schemacop/validator/number_validator.rb,<br /> lib/schemacop/validator/object_validator.rb,<br /> lib/schemacop/validator/string_validator.rb,<br /> lib/schemacop/validator/symbol_validator.rb,<br /> lib/schemacop/validator/boolean_validator.rb,<br /> lib/schemacop/validator/integer_validator.rb</span>
83
83
  </dd>
84
84
  </dl>
85
85
 
@@ -93,7 +93,7 @@
93
93
 
94
94
 
95
95
 
96
- <strong class="classes">Classes:</strong> <span class='object_link'><a href="Schemacop/ArrayValidator.html" title="Schemacop::ArrayValidator (class)">ArrayValidator</a></span>, <span class='object_link'><a href="Schemacop/BooleanValidator.html" title="Schemacop::BooleanValidator (class)">BooleanValidator</a></span>, <span class='object_link'><a href="Schemacop/Collector.html" title="Schemacop::Collector (class)">Collector</a></span>, <span class='object_link'><a href="Schemacop/FieldNode.html" title="Schemacop::FieldNode (class)">FieldNode</a></span>, <span class='object_link'><a href="Schemacop/FloatValidator.html" title="Schemacop::FloatValidator (class)">FloatValidator</a></span>, <span class='object_link'><a href="Schemacop/HashValidator.html" title="Schemacop::HashValidator (class)">HashValidator</a></span>, <span class='object_link'><a href="Schemacop/IntegerValidator.html" title="Schemacop::IntegerValidator (class)">IntegerValidator</a></span>, <span class='object_link'><a href="Schemacop/NilValidator.html" title="Schemacop::NilValidator (class)">NilValidator</a></span>, <span class='object_link'><a href="Schemacop/Node.html" title="Schemacop::Node (class)">Node</a></span>, <span class='object_link'><a href="Schemacop/NodeResolver.html" title="Schemacop::NodeResolver (class)">NodeResolver</a></span>, <span class='object_link'><a href="Schemacop/NodeSupportingField.html" title="Schemacop::NodeSupportingField (class)">NodeSupportingField</a></span>, <span class='object_link'><a href="Schemacop/NodeSupportingType.html" title="Schemacop::NodeSupportingType (class)">NodeSupportingType</a></span>, <span class='object_link'><a href="Schemacop/NodeWithBlock.html" title="Schemacop::NodeWithBlock (class)">NodeWithBlock</a></span>, <span class='object_link'><a href="Schemacop/NumberValidator.html" title="Schemacop::NumberValidator (class)">NumberValidator</a></span>, <span class='object_link'><a href="Schemacop/ObjectValidator.html" title="Schemacop::ObjectValidator (class)">ObjectValidator</a></span>, <span class='object_link'><a href="Schemacop/RootNode.html" title="Schemacop::RootNode (class)">RootNode</a></span>, <span class='object_link'><a href="Schemacop/Schema.html" title="Schemacop::Schema (class)">Schema</a></span>, <span class='object_link'><a href="Schemacop/StringValidator.html" title="Schemacop::StringValidator (class)">StringValidator</a></span>
96
+ <strong class="classes">Classes:</strong> <span class='object_link'><a href="Schemacop/ArrayValidator.html" title="Schemacop::ArrayValidator (class)">ArrayValidator</a></span>, <span class='object_link'><a href="Schemacop/BooleanValidator.html" title="Schemacop::BooleanValidator (class)">BooleanValidator</a></span>, <span class='object_link'><a href="Schemacop/Collector.html" title="Schemacop::Collector (class)">Collector</a></span>, <span class='object_link'><a href="Schemacop/FieldNode.html" title="Schemacop::FieldNode (class)">FieldNode</a></span>, <span class='object_link'><a href="Schemacop/FloatValidator.html" title="Schemacop::FloatValidator (class)">FloatValidator</a></span>, <span class='object_link'><a href="Schemacop/HashValidator.html" title="Schemacop::HashValidator (class)">HashValidator</a></span>, <span class='object_link'><a href="Schemacop/IntegerValidator.html" title="Schemacop::IntegerValidator (class)">IntegerValidator</a></span>, <span class='object_link'><a href="Schemacop/NilValidator.html" title="Schemacop::NilValidator (class)">NilValidator</a></span>, <span class='object_link'><a href="Schemacop/Node.html" title="Schemacop::Node (class)">Node</a></span>, <span class='object_link'><a href="Schemacop/NodeResolver.html" title="Schemacop::NodeResolver (class)">NodeResolver</a></span>, <span class='object_link'><a href="Schemacop/NodeSupportingField.html" title="Schemacop::NodeSupportingField (class)">NodeSupportingField</a></span>, <span class='object_link'><a href="Schemacop/NodeSupportingType.html" title="Schemacop::NodeSupportingType (class)">NodeSupportingType</a></span>, <span class='object_link'><a href="Schemacop/NodeWithBlock.html" title="Schemacop::NodeWithBlock (class)">NodeWithBlock</a></span>, <span class='object_link'><a href="Schemacop/NumberValidator.html" title="Schemacop::NumberValidator (class)">NumberValidator</a></span>, <span class='object_link'><a href="Schemacop/ObjectValidator.html" title="Schemacop::ObjectValidator (class)">ObjectValidator</a></span>, <span class='object_link'><a href="Schemacop/RootNode.html" title="Schemacop::RootNode (class)">RootNode</a></span>, <span class='object_link'><a href="Schemacop/Schema.html" title="Schemacop::Schema (class)">Schema</a></span>, <span class='object_link'><a href="Schemacop/StringValidator.html" title="Schemacop::StringValidator (class)">StringValidator</a></span>, <span class='object_link'><a href="Schemacop/SymbolValidator.html" title="Schemacop::SymbolValidator (class)">SymbolValidator</a></span>
97
97
 
98
98
 
99
99
  </p>
@@ -109,7 +109,7 @@
109
109
  </div>
110
110
 
111
111
  <div id="footer">
112
- Generated on Mon May 15 17:46:05 2017 by
112
+ Generated on Tue May 16 11:56:24 2017 by
113
113
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
114
114
  0.9.9 (ruby-2.3.1).
115
115
  </div>
data/doc/ScopedEnv.html CHANGED
@@ -341,7 +341,7 @@
341
341
  </div>
342
342
 
343
343
  <div id="footer">
344
- Generated on Mon May 15 17:46:05 2017 by
344
+ Generated on Tue May 16 11:56:24 2017 by
345
345
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
346
346
  0.9.9 (ruby-2.3.1).
347
347
  </div>
data/doc/_index.html CHANGED
@@ -313,6 +313,13 @@
313
313
 
314
314
  </li>
315
315
 
316
+ <li>
317
+ <span class='object_link'><a href="Schemacop/SymbolValidator.html" title="Schemacop::SymbolValidator (class)">SymbolValidator</a></span>
318
+
319
+ <small>(Schemacop)</small>
320
+
321
+ </li>
322
+
316
323
  </ul>
317
324
  </ul>
318
325
 
@@ -340,7 +347,7 @@
340
347
  </div>
341
348
 
342
349
  <div id="footer">
343
- Generated on Mon May 15 17:46:05 2017 by
350
+ Generated on Tue May 16 11:56:24 2017 by
344
351
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
345
352
  0.9.9 (ruby-2.3.1).
346
353
  </div>
data/doc/class_list.html CHANGED
@@ -43,7 +43,7 @@
43
43
 
44
44
  <ul id="full_list" class="class">
45
45
  <li id="object_" class="odd"><div class="item" style="padding-left:30px"><span class='object_link'><a href="top-level-namespace.html" title="Top Level Namespace (root)">Top Level Namespace</a></span></div></li>
46
- <li id='object_Schemacop' class='even'><div class='item' style='padding-left:30px'><a class='toggle'></a> <span class='object_link'><a href="Schemacop.html" title="Schemacop (module)">Schemacop</a></span><small class='search_info'>Top Level Namespace</small></div><ul><li id='object_Schemacop::ArrayValidator' class='collapsed odd'><div class='item' style='padding-left:45px'><span class='object_link'><a href="Schemacop/ArrayValidator.html" title="Schemacop::ArrayValidator (class)">ArrayValidator</a></span> &lt; NodeSupportingType<small class='search_info'>Schemacop</small></div></li><li id='object_Schemacop::BooleanValidator' class='collapsed even'><div class='item' style='padding-left:45px'><span class='object_link'><a href="Schemacop/BooleanValidator.html" title="Schemacop::BooleanValidator (class)">BooleanValidator</a></span> &lt; Node<small class='search_info'>Schemacop</small></div></li><li id='object_Schemacop::Collector' class='collapsed odd'><div class='item' style='padding-left:45px'><span class='object_link'><a href="Schemacop/Collector.html" title="Schemacop::Collector (class)">Collector</a></span> &lt; Object<small class='search_info'>Schemacop</small></div></li><li id='object_Schemacop::Exceptions' class='collapsed even'><div class='item' style='padding-left:45px'><a class='toggle'></a> <span class='object_link'><a href="Schemacop/Exceptions.html" title="Schemacop::Exceptions (module)">Exceptions</a></span><small class='search_info'>Schemacop</small></div><ul><li id='object_Schemacop::Exceptions::InvalidSchemaError' class='collapsed'><div class='item' style='padding-left:60px'><span class='object_link'><a href="Schemacop/Exceptions/InvalidSchemaError.html" title="Schemacop::Exceptions::InvalidSchemaError (class)">InvalidSchemaError</a></span> &lt; RuntimeError<small class='search_info'>Schemacop::Exceptions</small></div></li><li id='object_Schemacop::Exceptions::ValidationError' class='collapsed'><div class='item' style='padding-left:60px'><span class='object_link'><a href="Schemacop/Exceptions/ValidationError.html" title="Schemacop::Exceptions::ValidationError (class)">ValidationError</a></span> &lt; RuntimeError<small class='search_info'>Schemacop::Exceptions</small></div></li></ul></li><li id='object_Schemacop::FieldNode' class='collapsed odd'><div class='item' style='padding-left:45px'><span class='object_link'><a href="Schemacop/FieldNode.html" title="Schemacop::FieldNode (class)">FieldNode</a></span> &lt; NodeSupportingType<small class='search_info'>Schemacop</small></div></li><li id='object_Schemacop::FloatValidator' class='collapsed even'><div class='item' style='padding-left:45px'><span class='object_link'><a href="Schemacop/FloatValidator.html" title="Schemacop::FloatValidator (class)">FloatValidator</a></span> &lt; NumberValidator<small class='search_info'>Schemacop</small></div></li><li id='object_Schemacop::HashValidator' class='collapsed odd'><div class='item' style='padding-left:45px'><span class='object_link'><a href="Schemacop/HashValidator.html" title="Schemacop::HashValidator (class)">HashValidator</a></span> &lt; NodeSupportingField<small class='search_info'>Schemacop</small></div></li><li id='object_Schemacop::IntegerValidator' class='collapsed even'><div class='item' style='padding-left:45px'><span class='object_link'><a href="Schemacop/IntegerValidator.html" title="Schemacop::IntegerValidator (class)">IntegerValidator</a></span> &lt; NumberValidator<small class='search_info'>Schemacop</small></div></li><li id='object_Schemacop::NilValidator' class='collapsed odd'><div class='item' style='padding-left:45px'><span class='object_link'><a href="Schemacop/NilValidator.html" title="Schemacop::NilValidator (class)">NilValidator</a></span> &lt; Node<small class='search_info'>Schemacop</small></div></li><li id='object_Schemacop::Node' class='collapsed even'><div class='item' style='padding-left:45px'><span class='object_link'><a href="Schemacop/Node.html" title="Schemacop::Node (class)">Node</a></span> &lt; Object<small class='search_info'>Schemacop</small></div></li><li id='object_Schemacop::NodeResolver' class='collapsed odd'><div class='item' style='padding-left:45px'><span class='object_link'><a href="Schemacop/NodeResolver.html" title="Schemacop::NodeResolver (class)">NodeResolver</a></span> &lt; Object<small class='search_info'>Schemacop</small></div></li><li id='object_Schemacop::NodeSupportingField' class='collapsed even'><div class='item' style='padding-left:45px'><span class='object_link'><a href="Schemacop/NodeSupportingField.html" title="Schemacop::NodeSupportingField (class)">NodeSupportingField</a></span> &lt; NodeWithBlock<small class='search_info'>Schemacop</small></div></li><li id='object_Schemacop::NodeSupportingType' class='collapsed odd'><div class='item' style='padding-left:45px'><span class='object_link'><a href="Schemacop/NodeSupportingType.html" title="Schemacop::NodeSupportingType (class)">NodeSupportingType</a></span> &lt; NodeWithBlock<small class='search_info'>Schemacop</small></div></li><li id='object_Schemacop::NodeWithBlock' class='collapsed even'><div class='item' style='padding-left:45px'><span class='object_link'><a href="Schemacop/NodeWithBlock.html" title="Schemacop::NodeWithBlock (class)">NodeWithBlock</a></span> &lt; Node<small class='search_info'>Schemacop</small></div></li><li id='object_Schemacop::NumberValidator' class='collapsed odd'><div class='item' style='padding-left:45px'><span class='object_link'><a href="Schemacop/NumberValidator.html" title="Schemacop::NumberValidator (class)">NumberValidator</a></span> &lt; Node<small class='search_info'>Schemacop</small></div></li><li id='object_Schemacop::ObjectValidator' class='collapsed even'><div class='item' style='padding-left:45px'><span class='object_link'><a href="Schemacop/ObjectValidator.html" title="Schemacop::ObjectValidator (class)">ObjectValidator</a></span> &lt; Node<small class='search_info'>Schemacop</small></div></li><li id='object_Schemacop::RootNode' class='collapsed odd'><div class='item' style='padding-left:45px'><span class='object_link'><a href="Schemacop/RootNode.html" title="Schemacop::RootNode (class)">RootNode</a></span> &lt; NodeSupportingType<small class='search_info'>Schemacop</small></div></li><li id='object_Schemacop::Schema' class='collapsed even'><div class='item' style='padding-left:45px'><span class='object_link'><a href="Schemacop/Schema.html" title="Schemacop::Schema (class)">Schema</a></span> &lt; Object<small class='search_info'>Schemacop</small></div></li><li id='object_Schemacop::StringValidator' class='collapsed odd'><div class='item' style='padding-left:45px'><span class='object_link'><a href="Schemacop/StringValidator.html" title="Schemacop::StringValidator (class)">StringValidator</a></span> &lt; Node<small class='search_info'>Schemacop</small></div></li></ul></li><li id='object_ScopedEnv' class='even'><div class='item' style='padding-left:30px'><span class='object_link'><a href="ScopedEnv.html" title="ScopedEnv (class)">ScopedEnv</a></span> &lt; Object<small class='search_info'>Top Level Namespace</small></div></li>
46
+ <li id='object_Schemacop' class='even'><div class='item' style='padding-left:30px'><a class='toggle'></a> <span class='object_link'><a href="Schemacop.html" title="Schemacop (module)">Schemacop</a></span><small class='search_info'>Top Level Namespace</small></div><ul><li id='object_Schemacop::ArrayValidator' class='collapsed odd'><div class='item' style='padding-left:45px'><span class='object_link'><a href="Schemacop/ArrayValidator.html" title="Schemacop::ArrayValidator (class)">ArrayValidator</a></span> &lt; NodeSupportingType<small class='search_info'>Schemacop</small></div></li><li id='object_Schemacop::BooleanValidator' class='collapsed even'><div class='item' style='padding-left:45px'><span class='object_link'><a href="Schemacop/BooleanValidator.html" title="Schemacop::BooleanValidator (class)">BooleanValidator</a></span> &lt; Node<small class='search_info'>Schemacop</small></div></li><li id='object_Schemacop::Collector' class='collapsed odd'><div class='item' style='padding-left:45px'><span class='object_link'><a href="Schemacop/Collector.html" title="Schemacop::Collector (class)">Collector</a></span> &lt; Object<small class='search_info'>Schemacop</small></div></li><li id='object_Schemacop::Exceptions' class='collapsed even'><div class='item' style='padding-left:45px'><a class='toggle'></a> <span class='object_link'><a href="Schemacop/Exceptions.html" title="Schemacop::Exceptions (module)">Exceptions</a></span><small class='search_info'>Schemacop</small></div><ul><li id='object_Schemacop::Exceptions::InvalidSchemaError' class='collapsed'><div class='item' style='padding-left:60px'><span class='object_link'><a href="Schemacop/Exceptions/InvalidSchemaError.html" title="Schemacop::Exceptions::InvalidSchemaError (class)">InvalidSchemaError</a></span> &lt; RuntimeError<small class='search_info'>Schemacop::Exceptions</small></div></li><li id='object_Schemacop::Exceptions::ValidationError' class='collapsed'><div class='item' style='padding-left:60px'><span class='object_link'><a href="Schemacop/Exceptions/ValidationError.html" title="Schemacop::Exceptions::ValidationError (class)">ValidationError</a></span> &lt; RuntimeError<small class='search_info'>Schemacop::Exceptions</small></div></li></ul></li><li id='object_Schemacop::FieldNode' class='collapsed odd'><div class='item' style='padding-left:45px'><span class='object_link'><a href="Schemacop/FieldNode.html" title="Schemacop::FieldNode (class)">FieldNode</a></span> &lt; NodeSupportingType<small class='search_info'>Schemacop</small></div></li><li id='object_Schemacop::FloatValidator' class='collapsed even'><div class='item' style='padding-left:45px'><span class='object_link'><a href="Schemacop/FloatValidator.html" title="Schemacop::FloatValidator (class)">FloatValidator</a></span> &lt; NumberValidator<small class='search_info'>Schemacop</small></div></li><li id='object_Schemacop::HashValidator' class='collapsed odd'><div class='item' style='padding-left:45px'><span class='object_link'><a href="Schemacop/HashValidator.html" title="Schemacop::HashValidator (class)">HashValidator</a></span> &lt; NodeSupportingField<small class='search_info'>Schemacop</small></div></li><li id='object_Schemacop::IntegerValidator' class='collapsed even'><div class='item' style='padding-left:45px'><span class='object_link'><a href="Schemacop/IntegerValidator.html" title="Schemacop::IntegerValidator (class)">IntegerValidator</a></span> &lt; NumberValidator<small class='search_info'>Schemacop</small></div></li><li id='object_Schemacop::NilValidator' class='collapsed odd'><div class='item' style='padding-left:45px'><span class='object_link'><a href="Schemacop/NilValidator.html" title="Schemacop::NilValidator (class)">NilValidator</a></span> &lt; Node<small class='search_info'>Schemacop</small></div></li><li id='object_Schemacop::Node' class='collapsed even'><div class='item' style='padding-left:45px'><span class='object_link'><a href="Schemacop/Node.html" title="Schemacop::Node (class)">Node</a></span> &lt; Object<small class='search_info'>Schemacop</small></div></li><li id='object_Schemacop::NodeResolver' class='collapsed odd'><div class='item' style='padding-left:45px'><span class='object_link'><a href="Schemacop/NodeResolver.html" title="Schemacop::NodeResolver (class)">NodeResolver</a></span> &lt; Object<small class='search_info'>Schemacop</small></div></li><li id='object_Schemacop::NodeSupportingField' class='collapsed even'><div class='item' style='padding-left:45px'><span class='object_link'><a href="Schemacop/NodeSupportingField.html" title="Schemacop::NodeSupportingField (class)">NodeSupportingField</a></span> &lt; NodeWithBlock<small class='search_info'>Schemacop</small></div></li><li id='object_Schemacop::NodeSupportingType' class='collapsed odd'><div class='item' style='padding-left:45px'><span class='object_link'><a href="Schemacop/NodeSupportingType.html" title="Schemacop::NodeSupportingType (class)">NodeSupportingType</a></span> &lt; NodeWithBlock<small class='search_info'>Schemacop</small></div></li><li id='object_Schemacop::NodeWithBlock' class='collapsed even'><div class='item' style='padding-left:45px'><span class='object_link'><a href="Schemacop/NodeWithBlock.html" title="Schemacop::NodeWithBlock (class)">NodeWithBlock</a></span> &lt; Node<small class='search_info'>Schemacop</small></div></li><li id='object_Schemacop::NumberValidator' class='collapsed odd'><div class='item' style='padding-left:45px'><span class='object_link'><a href="Schemacop/NumberValidator.html" title="Schemacop::NumberValidator (class)">NumberValidator</a></span> &lt; Node<small class='search_info'>Schemacop</small></div></li><li id='object_Schemacop::ObjectValidator' class='collapsed even'><div class='item' style='padding-left:45px'><span class='object_link'><a href="Schemacop/ObjectValidator.html" title="Schemacop::ObjectValidator (class)">ObjectValidator</a></span> &lt; Node<small class='search_info'>Schemacop</small></div></li><li id='object_Schemacop::RootNode' class='collapsed odd'><div class='item' style='padding-left:45px'><span class='object_link'><a href="Schemacop/RootNode.html" title="Schemacop::RootNode (class)">RootNode</a></span> &lt; NodeSupportingType<small class='search_info'>Schemacop</small></div></li><li id='object_Schemacop::Schema' class='collapsed even'><div class='item' style='padding-left:45px'><span class='object_link'><a href="Schemacop/Schema.html" title="Schemacop::Schema (class)">Schema</a></span> &lt; Object<small class='search_info'>Schemacop</small></div></li><li id='object_Schemacop::StringValidator' class='collapsed odd'><div class='item' style='padding-left:45px'><span class='object_link'><a href="Schemacop/StringValidator.html" title="Schemacop::StringValidator (class)">StringValidator</a></span> &lt; Node<small class='search_info'>Schemacop</small></div></li><li id='object_Schemacop::SymbolValidator' class='collapsed even'><div class='item' style='padding-left:45px'><span class='object_link'><a href="Schemacop/SymbolValidator.html" title="Schemacop::SymbolValidator (class)">SymbolValidator</a></span> &lt; Node<small class='search_info'>Schemacop</small></div></li></ul></li><li id='object_ScopedEnv' class='odd'><div class='item' style='padding-left:30px'><span class='object_link'><a href="ScopedEnv.html" title="ScopedEnv (class)">ScopedEnv</a></span> &lt; Object<small class='search_info'>Top Level Namespace</small></div></li>
47
47
 
48
48
  </ul>
49
49
  </div>
data/doc/file.README.html CHANGED
@@ -329,10 +329,10 @@ there are plenty of short forms available which we will see below.</p>
329
329
 
330
330
  <h2>Types</h2>
331
331
 
332
- <p>The following types are supported by Schemacop:</p>
332
+ <p>Types are defined via their validators, which is a class under <code>validator/</code>.
333
+ Each validator is sourced by <code>schemacop.rb</code>.</p>
333
334
 
334
- <!-- TODO: Test the following statement: (you can easily extend them by writing
335
- another `your_validator.rb` class under `validator/`): -->
335
+ <p>The following types are supported by Schemacop by default:</p>
336
336
 
337
337
  <ul>
338
338
  <li><p><code>:boolean</code> accepts a Ruby TrueClass or FalseClass instance.</p></li>
@@ -356,6 +356,7 @@ another `your_validator.rb` class under `validator/`): -->
356
356
  <ul>
357
357
  <li>supported options: <code>min</code>, <code>max</code> (bounds for string length)</li>
358
358
  </ul></li>
359
+ <li><p><code>:symbol</code> accepts a Ruby Symbol.</p></li>
359
360
  <li><p><code>:object</code> accepts an arbitrary Ruby object (any object if no option is given).</p>
360
361
 
361
362
  <ul>
@@ -589,7 +590,7 @@ to <a href="http://www.subgit.com/">SubGit</a> for their great open source licen
589
590
  </div></div>
590
591
 
591
592
  <div id="footer">
592
- Generated on Mon May 15 17:46:05 2017 by
593
+ Generated on Tue May 16 11:56:24 2017 by
593
594
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
594
595
  0.9.9 (ruby-2.3.1).
595
596
  </div>
data/doc/index.html CHANGED
@@ -329,10 +329,10 @@ there are plenty of short forms available which we will see below.</p>
329
329
 
330
330
  <h2>Types</h2>
331
331
 
332
- <p>The following types are supported by Schemacop:</p>
332
+ <p>Types are defined via their validators, which is a class under <code>validator/</code>.
333
+ Each validator is sourced by <code>schemacop.rb</code>.</p>
333
334
 
334
- <!-- TODO: Test the following statement: (you can easily extend them by writing
335
- another `your_validator.rb` class under `validator/`): -->
335
+ <p>The following types are supported by Schemacop by default:</p>
336
336
 
337
337
  <ul>
338
338
  <li><p><code>:boolean</code> accepts a Ruby TrueClass or FalseClass instance.</p></li>
@@ -356,6 +356,7 @@ another `your_validator.rb` class under `validator/`): -->
356
356
  <ul>
357
357
  <li>supported options: <code>min</code>, <code>max</code> (bounds for string length)</li>
358
358
  </ul></li>
359
+ <li><p><code>:symbol</code> accepts a Ruby Symbol.</p></li>
359
360
  <li><p><code>:object</code> accepts an arbitrary Ruby object (any object if no option is given).</p>
360
361
 
361
362
  <ul>
@@ -589,7 +590,7 @@ to <a href="http://www.subgit.com/">SubGit</a> for their great open source licen
589
590
  </div></div>
590
591
 
591
592
  <div id="footer">
592
- Generated on Mon May 15 17:46:05 2017 by
593
+ Generated on Tue May 16 11:56:24 2017 by
593
594
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
594
595
  0.9.9 (ruby-2.3.1).
595
596
  </div>
@@ -102,7 +102,7 @@
102
102
  </div>
103
103
 
104
104
  <div id="footer">
105
- Generated on Mon May 15 17:46:05 2017 by
105
+ Generated on Tue May 16 11:56:24 2017 by
106
106
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
107
107
  0.9.9 (ruby-2.3.1).
108
108
  </div>
@@ -23,7 +23,7 @@ module Schemacop
23
23
  field(*args, required: true, allow_nil: false, &block)
24
24
  end
25
25
 
26
- alias req req!
26
+ alias_method :req, :req!
27
27
 
28
28
  def opt?(*args, &block)
29
29
  field(*args, required: false, allow_nil: true, &block)
@@ -33,7 +33,7 @@ module Schemacop
33
33
  field(*args, required: false, allow_nil: false, &block)
34
34
  end
35
35
 
36
- alias opt opt?
36
+ alias_method :opt, :opt?
37
37
 
38
38
  protected
39
39
 
@@ -42,7 +42,6 @@ module Schemacop
42
42
  # options = args.last.is_a?(Hash) ? args.pop : {}
43
43
  name = args.shift
44
44
 
45
- # rubocop: disable Style/IfInsideElse
46
45
  if @fields[name]
47
46
  @fields[name].type(*args, &block)
48
47
  else
@@ -54,7 +53,6 @@ module Schemacop
54
53
  @fields[name] = FieldNode.new(name, required, &block)
55
54
  end
56
55
  end
57
- # rubocop: enable Style/IfInsideElse
58
56
 
59
57
  @fields[name].type(:nil) if allow_nil
60
58
  end
@@ -0,0 +1,5 @@
1
+ module Schemacop
2
+ class SymbolValidator < Node
3
+ register symbols: :symbol, klasses: Symbol
4
+ end
5
+ end
data/lib/schemacop.rb CHANGED
@@ -21,6 +21,7 @@ require 'schemacop/validator/hash_validator'
21
21
  require 'schemacop/validator/number_validator'
22
22
  require 'schemacop/validator/integer_validator'
23
23
  require 'schemacop/validator/float_validator'
24
+ require 'schemacop/validator/symbol_validator'
24
25
  require 'schemacop/validator/string_validator'
25
26
  require 'schemacop/validator/nil_validator'
26
27
  require 'schemacop/validator/object_validator' # Matches any object, must be last validator
data/schemacop.gemspec CHANGED
@@ -1,20 +1,20 @@
1
1
  # -*- encoding: utf-8 -*-
2
- # stub: schemacop 2.0.0 ruby lib
2
+ # stub: schemacop 2.1.0 ruby lib
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "schemacop".freeze
6
- s.version = "2.0.0"
6
+ s.version = "2.1.0"
7
7
 
8
8
  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
9
9
  s.require_paths = ["lib".freeze]
10
10
  s.authors = ["Sitrox".freeze]
11
- s.date = "2017-05-15"
12
- s.files = [".gitignore".freeze, ".releaser_config".freeze, ".rubocop.yml".freeze, ".travis.yml".freeze, ".yardopts".freeze, "CHANGELOG.md".freeze, "Gemfile".freeze, "LICENSE".freeze, "README.md".freeze, "RUBY_VERSION".freeze, "Rakefile".freeze, "VERSION".freeze, "doc/Schemacop.html".freeze, "doc/Schemacop/ArrayValidator.html".freeze, "doc/Schemacop/BooleanValidator.html".freeze, "doc/Schemacop/Collector.html".freeze, "doc/Schemacop/Exceptions.html".freeze, "doc/Schemacop/Exceptions/InvalidSchemaError.html".freeze, "doc/Schemacop/Exceptions/ValidationError.html".freeze, "doc/Schemacop/FieldNode.html".freeze, "doc/Schemacop/FloatValidator.html".freeze, "doc/Schemacop/HashValidator.html".freeze, "doc/Schemacop/IntegerValidator.html".freeze, "doc/Schemacop/NilValidator.html".freeze, "doc/Schemacop/Node.html".freeze, "doc/Schemacop/NodeResolver.html".freeze, "doc/Schemacop/NodeSupportingField.html".freeze, "doc/Schemacop/NodeSupportingType.html".freeze, "doc/Schemacop/NodeWithBlock.html".freeze, "doc/Schemacop/NumberValidator.html".freeze, "doc/Schemacop/ObjectValidator.html".freeze, "doc/Schemacop/RootNode.html".freeze, "doc/Schemacop/Schema.html".freeze, "doc/Schemacop/StringValidator.html".freeze, "doc/ScopedEnv.html".freeze, "doc/_index.html".freeze, "doc/class_list.html".freeze, "doc/css/common.css".freeze, "doc/css/full_list.css".freeze, "doc/css/style.css".freeze, "doc/file.README.html".freeze, "doc/file_list.html".freeze, "doc/frames.html".freeze, "doc/index.html".freeze, "doc/inheritance.graphml".freeze, "doc/inheritance.pdf".freeze, "doc/js/app.js".freeze, "doc/js/full_list.js".freeze, "doc/js/jquery.js".freeze, "doc/method_list.html".freeze, "doc/top-level-namespace.html".freeze, "lib/schemacop.rb".freeze, "lib/schemacop/collector.rb".freeze, "lib/schemacop/exceptions.rb".freeze, "lib/schemacop/field_node.rb".freeze, "lib/schemacop/node.rb".freeze, "lib/schemacop/node_resolver.rb".freeze, "lib/schemacop/node_supporting_field.rb".freeze, "lib/schemacop/node_supporting_type.rb".freeze, "lib/schemacop/node_with_block.rb".freeze, "lib/schemacop/root_node.rb".freeze, "lib/schemacop/schema.rb".freeze, "lib/schemacop/scoped_env.rb".freeze, "lib/schemacop/validator/array_validator.rb".freeze, "lib/schemacop/validator/boolean_validator.rb".freeze, "lib/schemacop/validator/float_validator.rb".freeze, "lib/schemacop/validator/hash_validator.rb".freeze, "lib/schemacop/validator/integer_validator.rb".freeze, "lib/schemacop/validator/nil_validator.rb".freeze, "lib/schemacop/validator/number_validator.rb".freeze, "lib/schemacop/validator/object_validator.rb".freeze, "lib/schemacop/validator/string_validator.rb".freeze, "schemacop.gemspec".freeze, "test/custom_check_test.rb".freeze, "test/custom_if_test.rb".freeze, "test/nil_dis_allow_test.rb".freeze, "test/short_forms_test.rb".freeze, "test/test_helper.rb".freeze, "test/types_test.rb".freeze, "test/validator_array_test.rb".freeze, "test/validator_boolean_test.rb".freeze, "test/validator_float_test.rb".freeze, "test/validator_hash_test.rb".freeze, "test/validator_integer_test.rb".freeze, "test/validator_nil_test.rb".freeze, "test/validator_number_test.rb".freeze, "test/validator_object_test.rb".freeze, "test/validator_string_test.rb".freeze]
11
+ s.date = "2017-05-16"
12
+ s.files = [".gitignore".freeze, ".releaser_config".freeze, ".rubocop.yml".freeze, ".travis.yml".freeze, ".yardopts".freeze, "CHANGELOG.md".freeze, "Gemfile".freeze, "LICENSE".freeze, "README.md".freeze, "RUBY_VERSION".freeze, "Rakefile".freeze, "VERSION".freeze, "doc/Schemacop.html".freeze, "doc/Schemacop/ArrayValidator.html".freeze, "doc/Schemacop/BooleanValidator.html".freeze, "doc/Schemacop/Collector.html".freeze, "doc/Schemacop/Exceptions.html".freeze, "doc/Schemacop/Exceptions/InvalidSchemaError.html".freeze, "doc/Schemacop/Exceptions/ValidationError.html".freeze, "doc/Schemacop/FieldNode.html".freeze, "doc/Schemacop/FloatValidator.html".freeze, "doc/Schemacop/HashValidator.html".freeze, "doc/Schemacop/IntegerValidator.html".freeze, "doc/Schemacop/NilValidator.html".freeze, "doc/Schemacop/Node.html".freeze, "doc/Schemacop/NodeResolver.html".freeze, "doc/Schemacop/NodeSupportingField.html".freeze, "doc/Schemacop/NodeSupportingType.html".freeze, "doc/Schemacop/NodeWithBlock.html".freeze, "doc/Schemacop/NumberValidator.html".freeze, "doc/Schemacop/ObjectValidator.html".freeze, "doc/Schemacop/RootNode.html".freeze, "doc/Schemacop/Schema.html".freeze, "doc/Schemacop/StringValidator.html".freeze, "doc/Schemacop/SymbolValidator.html".freeze, "doc/ScopedEnv.html".freeze, "doc/_index.html".freeze, "doc/class_list.html".freeze, "doc/css/common.css".freeze, "doc/css/full_list.css".freeze, "doc/css/style.css".freeze, "doc/file.README.html".freeze, "doc/file_list.html".freeze, "doc/frames.html".freeze, "doc/index.html".freeze, "doc/inheritance.graphml".freeze, "doc/inheritance.pdf".freeze, "doc/js/app.js".freeze, "doc/js/full_list.js".freeze, "doc/js/jquery.js".freeze, "doc/method_list.html".freeze, "doc/top-level-namespace.html".freeze, "lib/schemacop.rb".freeze, "lib/schemacop/collector.rb".freeze, "lib/schemacop/exceptions.rb".freeze, "lib/schemacop/field_node.rb".freeze, "lib/schemacop/node.rb".freeze, "lib/schemacop/node_resolver.rb".freeze, "lib/schemacop/node_supporting_field.rb".freeze, "lib/schemacop/node_supporting_type.rb".freeze, "lib/schemacop/node_with_block.rb".freeze, "lib/schemacop/root_node.rb".freeze, "lib/schemacop/schema.rb".freeze, "lib/schemacop/scoped_env.rb".freeze, "lib/schemacop/validator/array_validator.rb".freeze, "lib/schemacop/validator/boolean_validator.rb".freeze, "lib/schemacop/validator/float_validator.rb".freeze, "lib/schemacop/validator/hash_validator.rb".freeze, "lib/schemacop/validator/integer_validator.rb".freeze, "lib/schemacop/validator/nil_validator.rb".freeze, "lib/schemacop/validator/number_validator.rb".freeze, "lib/schemacop/validator/object_validator.rb".freeze, "lib/schemacop/validator/string_validator.rb".freeze, "lib/schemacop/validator/symbol_validator.rb".freeze, "schemacop.gemspec".freeze, "test/custom_check_test.rb".freeze, "test/custom_if_test.rb".freeze, "test/nil_dis_allow_test.rb".freeze, "test/short_forms_test.rb".freeze, "test/test_helper.rb".freeze, "test/types_test.rb".freeze, "test/validator_array_test.rb".freeze, "test/validator_boolean_test.rb".freeze, "test/validator_float_test.rb".freeze, "test/validator_hash_test.rb".freeze, "test/validator_integer_test.rb".freeze, "test/validator_nil_test.rb".freeze, "test/validator_number_test.rb".freeze, "test/validator_object_test.rb".freeze, "test/validator_string_test.rb".freeze, "test/validator_symbol_test.rb".freeze]
13
13
  s.homepage = "https://github.com/sitrox/schemacop".freeze
14
14
  s.licenses = ["MIT".freeze]
15
15
  s.rubygems_version = "2.6.6".freeze
16
16
  s.summary = "Schemacop validates ruby structures consisting of nested hashes and arrays against simple schema definitions.".freeze
17
- s.test_files = ["test/custom_check_test.rb".freeze, "test/custom_if_test.rb".freeze, "test/nil_dis_allow_test.rb".freeze, "test/short_forms_test.rb".freeze, "test/test_helper.rb".freeze, "test/types_test.rb".freeze, "test/validator_array_test.rb".freeze, "test/validator_boolean_test.rb".freeze, "test/validator_float_test.rb".freeze, "test/validator_hash_test.rb".freeze, "test/validator_integer_test.rb".freeze, "test/validator_nil_test.rb".freeze, "test/validator_number_test.rb".freeze, "test/validator_object_test.rb".freeze, "test/validator_string_test.rb".freeze]
17
+ s.test_files = ["test/custom_check_test.rb".freeze, "test/custom_if_test.rb".freeze, "test/nil_dis_allow_test.rb".freeze, "test/short_forms_test.rb".freeze, "test/test_helper.rb".freeze, "test/types_test.rb".freeze, "test/validator_array_test.rb".freeze, "test/validator_boolean_test.rb".freeze, "test/validator_float_test.rb".freeze, "test/validator_hash_test.rb".freeze, "test/validator_integer_test.rb".freeze, "test/validator_nil_test.rb".freeze, "test/validator_number_test.rb".freeze, "test/validator_object_test.rb".freeze, "test/validator_string_test.rb".freeze, "test/validator_symbol_test.rb".freeze]
18
18
 
19
19
  if s.respond_to? :specification_version then
20
20
  s.specification_version = 4
data/test/types_test.rb CHANGED
@@ -9,6 +9,7 @@ module Schemacop
9
9
  hash: {},
10
10
  integer: -5,
11
11
  number: -3.2,
12
+ symbol: :thing,
12
13
  object: self,
13
14
  string: 'miau' }.freeze
14
15
  end
@@ -0,0 +1,16 @@
1
+ require 'test_helper'
2
+
3
+ module Schemacop
4
+ class ValidatorSymbolTest < Minitest::Test
5
+ def test_basic
6
+ s = Schema.new do
7
+ type :symbol
8
+ end
9
+
10
+ assert_nil s.validate!(:good)
11
+ assert_nil s.validate!('-+/'.to_sym)
12
+ assert_verr { s.validate!('bad') }
13
+ assert_verr { s.validate!(456) }
14
+ end
15
+ end
16
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: schemacop
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sitrox
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-05-15 00:00:00.000000000 Z
11
+ date: 2017-05-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -176,6 +176,7 @@ files:
176
176
  - doc/Schemacop/RootNode.html
177
177
  - doc/Schemacop/Schema.html
178
178
  - doc/Schemacop/StringValidator.html
179
+ - doc/Schemacop/SymbolValidator.html
179
180
  - doc/ScopedEnv.html
180
181
  - doc/_index.html
181
182
  - doc/class_list.html
@@ -214,6 +215,7 @@ files:
214
215
  - lib/schemacop/validator/number_validator.rb
215
216
  - lib/schemacop/validator/object_validator.rb
216
217
  - lib/schemacop/validator/string_validator.rb
218
+ - lib/schemacop/validator/symbol_validator.rb
217
219
  - schemacop.gemspec
218
220
  - test/custom_check_test.rb
219
221
  - test/custom_if_test.rb
@@ -230,6 +232,7 @@ files:
230
232
  - test/validator_number_test.rb
231
233
  - test/validator_object_test.rb
232
234
  - test/validator_string_test.rb
235
+ - test/validator_symbol_test.rb
233
236
  homepage: https://github.com/sitrox/schemacop
234
237
  licenses:
235
238
  - MIT
@@ -271,3 +274,4 @@ test_files:
271
274
  - test/validator_number_test.rb
272
275
  - test/validator_object_test.rb
273
276
  - test/validator_string_test.rb
277
+ - test/validator_symbol_test.rb