schemacop 2.4.5 → 3.0.0.rc2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +3 -0
- data/.rubocop.yml +25 -1
- data/.travis.yml +3 -1
- data/CHANGELOG.md +32 -1
- data/README.md +53 -710
- data/README_V2.md +775 -0
- data/README_V3.md +1195 -0
- data/Rakefile +8 -12
- data/VERSION +1 -1
- data/lib/schemacop.rb +35 -36
- data/lib/schemacop/base_schema.rb +37 -0
- data/lib/schemacop/railtie.rb +10 -0
- data/lib/schemacop/schema.rb +1 -60
- data/lib/schemacop/schema2.rb +22 -0
- data/lib/schemacop/schema3.rb +21 -0
- data/lib/schemacop/scoped_env.rb +25 -13
- data/lib/schemacop/v2.rb +26 -0
- data/lib/schemacop/{caster.rb → v2/caster.rb} +16 -2
- data/lib/schemacop/{collector.rb → v2/collector.rb} +5 -2
- data/lib/schemacop/{dupper.rb → v2/dupper.rb} +1 -1
- data/lib/schemacop/{field_node.rb → v2/field_node.rb} +4 -3
- data/lib/schemacop/v2/node.rb +142 -0
- data/lib/schemacop/{node_resolver.rb → v2/node_resolver.rb} +1 -1
- data/lib/schemacop/v2/node_supporting_field.rb +70 -0
- data/lib/schemacop/{node_supporting_type.rb → v2/node_supporting_type.rb} +14 -11
- data/lib/schemacop/{node_with_block.rb → v2/node_with_block.rb} +3 -2
- data/lib/schemacop/v2/root_node.rb +6 -0
- data/lib/schemacop/v2/validator/array_validator.rb +32 -0
- data/lib/schemacop/{validator → v2/validator}/boolean_validator.rb +1 -1
- data/lib/schemacop/v2/validator/float_validator.rb +7 -0
- data/lib/schemacop/v2/validator/hash_validator.rb +37 -0
- data/lib/schemacop/v2/validator/integer_validator.rb +7 -0
- data/lib/schemacop/{validator → v2/validator}/nil_validator.rb +1 -1
- data/lib/schemacop/v2/validator/number_validator.rb +21 -0
- data/lib/schemacop/v2/validator/object_validator.rb +29 -0
- data/lib/schemacop/v2/validator/string_validator.rb +39 -0
- data/lib/schemacop/{validator → v2/validator}/symbol_validator.rb +1 -1
- data/lib/schemacop/v3.rb +45 -0
- data/lib/schemacop/v3/all_of_node.rb +27 -0
- data/lib/schemacop/v3/any_of_node.rb +28 -0
- data/lib/schemacop/v3/array_node.rb +218 -0
- data/lib/schemacop/v3/boolean_node.rb +16 -0
- data/lib/schemacop/v3/combination_node.rb +45 -0
- data/lib/schemacop/v3/context.rb +17 -0
- data/lib/schemacop/v3/dsl_scope.rb +46 -0
- data/lib/schemacop/v3/global_context.rb +114 -0
- data/lib/schemacop/v3/hash_node.rb +256 -0
- data/lib/schemacop/v3/integer_node.rb +13 -0
- data/lib/schemacop/v3/is_not_node.rb +32 -0
- data/lib/schemacop/v3/node.rb +215 -0
- data/lib/schemacop/v3/node_registry.rb +49 -0
- data/lib/schemacop/v3/number_node.rb +18 -0
- data/lib/schemacop/v3/numeric_node.rb +76 -0
- data/lib/schemacop/v3/object_node.rb +40 -0
- data/lib/schemacop/v3/one_of_node.rb +28 -0
- data/lib/schemacop/v3/reference_node.rb +49 -0
- data/lib/schemacop/v3/result.rb +58 -0
- data/lib/schemacop/v3/string_node.rb +124 -0
- data/lib/schemacop/v3/symbol_node.rb +13 -0
- data/schemacop.gemspec +24 -27
- data/test/lib/test_helper.rb +152 -0
- data/test/schemas/nested/group.rb +6 -0
- data/test/schemas/user.rb +7 -0
- data/test/unit/schemacop/v2/casting_test.rb +120 -0
- data/test/unit/schemacop/v2/collector_test.rb +47 -0
- data/test/unit/schemacop/v2/custom_check_test.rb +95 -0
- data/test/unit/schemacop/v2/custom_if_test.rb +97 -0
- data/test/unit/schemacop/v2/defaults_test.rb +95 -0
- data/test/unit/schemacop/v2/empty_test.rb +16 -0
- data/test/unit/schemacop/v2/nil_dis_allow_test.rb +43 -0
- data/test/unit/schemacop/v2/node_resolver_test.rb +28 -0
- data/test/unit/schemacop/v2/short_forms_test.rb +351 -0
- data/test/unit/schemacop/v2/types_test.rb +88 -0
- data/test/unit/schemacop/v2/validator_array_test.rb +99 -0
- data/test/unit/schemacop/v2/validator_boolean_test.rb +17 -0
- data/test/unit/schemacop/v2/validator_float_test.rb +59 -0
- data/test/unit/schemacop/v2/validator_hash_test.rb +95 -0
- data/test/unit/schemacop/v2/validator_integer_test.rb +48 -0
- data/test/unit/schemacop/v2/validator_nil_test.rb +15 -0
- data/test/unit/schemacop/v2/validator_number_test.rb +62 -0
- data/test/unit/schemacop/v2/validator_object_test.rb +141 -0
- data/test/unit/schemacop/v2/validator_string_test.rb +78 -0
- data/test/unit/schemacop/v2/validator_symbol_test.rb +18 -0
- data/test/unit/schemacop/v3/all_of_node_test.rb +198 -0
- data/test/unit/schemacop/v3/any_of_node_test.rb +218 -0
- data/test/unit/schemacop/v3/array_node_test.rb +815 -0
- data/test/unit/schemacop/v3/boolean_node_test.rb +126 -0
- data/test/unit/schemacop/v3/global_context_test.rb +164 -0
- data/test/unit/schemacop/v3/hash_node_test.rb +884 -0
- data/test/unit/schemacop/v3/integer_node_test.rb +323 -0
- data/test/unit/schemacop/v3/is_not_node_test.rb +173 -0
- data/test/unit/schemacop/v3/node_test.rb +148 -0
- data/test/unit/schemacop/v3/number_node_test.rb +292 -0
- data/test/unit/schemacop/v3/object_node_test.rb +170 -0
- data/test/unit/schemacop/v3/one_of_node_test.rb +187 -0
- data/test/unit/schemacop/v3/reference_node_test.rb +351 -0
- data/test/unit/schemacop/v3/string_node_test.rb +334 -0
- data/test/unit/schemacop/v3/symbol_node_test.rb +75 -0
- metadata +152 -145
- data/doc/Schemacop.html +0 -146
- data/doc/Schemacop/ArrayValidator.html +0 -329
- data/doc/Schemacop/BooleanValidator.html +0 -145
- data/doc/Schemacop/Caster.html +0 -379
- data/doc/Schemacop/Collector.html +0 -787
- data/doc/Schemacop/Dupper.html +0 -214
- data/doc/Schemacop/Exceptions.html +0 -115
- data/doc/Schemacop/Exceptions/InvalidSchemaError.html +0 -124
- data/doc/Schemacop/Exceptions/ValidationError.html +0 -124
- data/doc/Schemacop/FieldNode.html +0 -421
- data/doc/Schemacop/FloatValidator.html +0 -158
- data/doc/Schemacop/HashValidator.html +0 -293
- data/doc/Schemacop/IntegerValidator.html +0 -158
- data/doc/Schemacop/NilValidator.html +0 -145
- data/doc/Schemacop/Node.html +0 -1438
- data/doc/Schemacop/NodeResolver.html +0 -258
- data/doc/Schemacop/NodeSupportingField.html +0 -590
- data/doc/Schemacop/NodeSupportingType.html +0 -612
- data/doc/Schemacop/NodeWithBlock.html +0 -289
- data/doc/Schemacop/NumberValidator.html +0 -232
- data/doc/Schemacop/ObjectValidator.html +0 -298
- data/doc/Schemacop/RootNode.html +0 -171
- data/doc/Schemacop/Schema.html +0 -699
- data/doc/Schemacop/StringValidator.html +0 -295
- data/doc/Schemacop/SymbolValidator.html +0 -145
- data/doc/ScopedEnv.html +0 -351
- data/doc/_index.html +0 -379
- data/doc/class_list.html +0 -51
- data/doc/css/common.css +0 -1
- data/doc/css/full_list.css +0 -58
- data/doc/css/style.css +0 -496
- data/doc/file.README.html +0 -833
- data/doc/file_list.html +0 -56
- data/doc/frames.html +0 -17
- data/doc/index.html +0 -833
- data/doc/inheritance.graphml +0 -524
- data/doc/inheritance.pdf +0 -825
- data/doc/js/app.js +0 -303
- data/doc/js/full_list.js +0 -216
- data/doc/js/jquery.js +0 -4
- data/doc/method_list.html +0 -587
- data/doc/top-level-namespace.html +0 -112
- data/lib/schemacop/node.rb +0 -139
- data/lib/schemacop/node_supporting_field.rb +0 -58
- data/lib/schemacop/root_node.rb +0 -4
- data/lib/schemacop/validator/array_validator.rb +0 -30
- data/lib/schemacop/validator/float_validator.rb +0 -5
- data/lib/schemacop/validator/hash_validator.rb +0 -35
- data/lib/schemacop/validator/integer_validator.rb +0 -5
- data/lib/schemacop/validator/number_validator.rb +0 -19
- data/lib/schemacop/validator/object_validator.rb +0 -27
- data/lib/schemacop/validator/string_validator.rb +0 -37
- data/test/casting_test.rb +0 -90
- data/test/collector_test.rb +0 -45
- data/test/custom_check_test.rb +0 -93
- data/test/custom_if_test.rb +0 -95
- data/test/defaults_test.rb +0 -93
- data/test/empty_test.rb +0 -14
- data/test/nil_dis_allow_test.rb +0 -41
- data/test/node_resolver_test.rb +0 -26
- data/test/short_forms_test.rb +0 -349
- data/test/test_helper.rb +0 -13
- data/test/types_test.rb +0 -84
- data/test/validator_array_test.rb +0 -97
- data/test/validator_boolean_test.rb +0 -15
- data/test/validator_float_test.rb +0 -57
- data/test/validator_hash_test.rb +0 -93
- data/test/validator_integer_test.rb +0 -46
- data/test/validator_nil_test.rb +0 -13
- data/test/validator_number_test.rb +0 -60
- data/test/validator_object_test.rb +0 -139
- data/test/validator_string_test.rb +0 -76
- data/test/validator_symbol_test.rb +0 -16
@@ -1,158 +0,0 @@
|
|
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::IntegerValidator
|
8
|
-
|
9
|
-
— Documentation by YARD 0.9.20
|
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::IntegerValidator";
|
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 (I)</a> »
|
40
|
-
<span class='title'><span class='object_link'><a href="../Schemacop.html" title="Schemacop (module)">Schemacop</a></span></span>
|
41
|
-
»
|
42
|
-
<span class="title">IntegerValidator</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::IntegerValidator
|
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="NumberValidator.html" title="Schemacop::NumberValidator (class)">NumberValidator</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"><span class='object_link'><a href="NumberValidator.html" title="Schemacop::NumberValidator (class)">NumberValidator</a></span></li>
|
80
|
-
|
81
|
-
<li class="next">Schemacop::IntegerValidator</li>
|
82
|
-
|
83
|
-
</ul>
|
84
|
-
<a href="#" class="inheritanceTree">show all</a>
|
85
|
-
|
86
|
-
</dd>
|
87
|
-
</dl>
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
<dl>
|
100
|
-
<dt>Defined in:</dt>
|
101
|
-
<dd>lib/schemacop/validator/integer_validator.rb</dd>
|
102
|
-
</dl>
|
103
|
-
|
104
|
-
</div>
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
<h2>Instance Attribute Summary</h2>
|
113
|
-
|
114
|
-
<h3 class="inherited">Attributes inherited from <span class='object_link'><a href="Node.html" title="Schemacop::Node (class)">Node</a></span></h3>
|
115
|
-
<p class="inherited"><span class='object_link'><a href="Node.html#options-instance_method" title="Schemacop::Node#options (method)">#options</a></span></p>
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
<h2>Method Summary</h2>
|
126
|
-
|
127
|
-
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="NumberValidator.html" title="Schemacop::NumberValidator (class)">NumberValidator</a></span></h3>
|
128
|
-
<p class="inherited"><span class='object_link'><a href="NumberValidator.html#validate-instance_method" title="Schemacop::NumberValidator#validate (method)">#validate</a></span></p>
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="Node.html" title="Schemacop::Node (class)">Node</a></span></h3>
|
139
|
-
<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-instance_method" title="Schemacop::Node#type_matches? (method)">#type_matches?</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#validate-instance_method" title="Schemacop::Node#validate (method)">#validate</a></span></p>
|
140
|
-
<div id="constructor_details" class="method_details_list">
|
141
|
-
<h2>Constructor Details</h2>
|
142
|
-
|
143
|
-
<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>
|
144
|
-
|
145
|
-
</div>
|
146
|
-
|
147
|
-
|
148
|
-
</div>
|
149
|
-
|
150
|
-
<div id="footer">
|
151
|
-
Generated on Wed May 13 10:52:04 2020 by
|
152
|
-
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
153
|
-
0.9.20 (ruby-2.6.2).
|
154
|
-
</div>
|
155
|
-
|
156
|
-
</div>
|
157
|
-
</body>
|
158
|
-
</html>
|
@@ -1,145 +0,0 @@
|
|
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::NilValidator
|
8
|
-
|
9
|
-
— Documentation by YARD 0.9.20
|
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::NilValidator";
|
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 (N)</a> »
|
40
|
-
<span class='title'><span class='object_link'><a href="../Schemacop.html" title="Schemacop (module)">Schemacop</a></span></span>
|
41
|
-
»
|
42
|
-
<span class="title">NilValidator</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::NilValidator
|
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::NilValidator</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/nil_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-instance_method" title="Schemacop::Node#type_matches? (method)">#type_matches?</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#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 Wed May 13 10:52:04 2020 by
|
139
|
-
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
140
|
-
0.9.20 (ruby-2.6.2).
|
141
|
-
</div>
|
142
|
-
|
143
|
-
</div>
|
144
|
-
</body>
|
145
|
-
</html>
|
data/doc/Schemacop/Node.html
DELETED
@@ -1,1438 +0,0 @@
|
|
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::Node
|
8
|
-
|
9
|
-
— Documentation by YARD 0.9.20
|
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::Node";
|
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 (N)</a> »
|
40
|
-
<span class='title'><span class='object_link'><a href="../Schemacop.html" title="Schemacop (module)">Schemacop</a></span></span>
|
41
|
-
»
|
42
|
-
<span class="title">Node</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::Node
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
</h1>
|
67
|
-
<div class="box_info">
|
68
|
-
|
69
|
-
<dl>
|
70
|
-
<dt>Inherits:</dt>
|
71
|
-
<dd>
|
72
|
-
<span class="inheritName">Object</span>
|
73
|
-
|
74
|
-
<ul class="fullTree">
|
75
|
-
<li>Object</li>
|
76
|
-
|
77
|
-
<li class="next">Schemacop::Node</li>
|
78
|
-
|
79
|
-
</ul>
|
80
|
-
<a href="#" class="inheritanceTree">show all</a>
|
81
|
-
|
82
|
-
</dd>
|
83
|
-
</dl>
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
<dl>
|
96
|
-
<dt>Defined in:</dt>
|
97
|
-
<dd>lib/schemacop/node.rb</dd>
|
98
|
-
</dl>
|
99
|
-
|
100
|
-
</div>
|
101
|
-
|
102
|
-
<div id="subclasses">
|
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>, <span class='object_link'><a href="SymbolValidator.html" title="Schemacop::SymbolValidator (class)">SymbolValidator</a></span></p>
|
105
|
-
</div>
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
<h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
|
111
|
-
<ul class="summary">
|
112
|
-
|
113
|
-
<li class="public ">
|
114
|
-
<span class="summary_signature">
|
115
|
-
|
116
|
-
<a href="#options-instance_method" title="#options (instance method)">#<strong>options</strong> ⇒ Object </a>
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
</span>
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
<span class="note title readonly">readonly</span>
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
<span class="summary_desc"><div class='inline'><p>Returns the value of attribute options.</p>
|
136
|
-
</div></span>
|
137
|
-
|
138
|
-
</li>
|
139
|
-
|
140
|
-
|
141
|
-
</ul>
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
<h2>
|
148
|
-
Class Method Summary
|
149
|
-
<small><a href="#" class="summary_toggle">collapse</a></small>
|
150
|
-
</h2>
|
151
|
-
|
152
|
-
<ul class="summary">
|
153
|
-
|
154
|
-
<li class="public ">
|
155
|
-
<span class="summary_signature">
|
156
|
-
|
157
|
-
<a href="#build-class_method" title="build (class method)">.<strong>build</strong>(options, &block) ⇒ Object </a>
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
</span>
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
172
|
-
|
173
|
-
</li>
|
174
|
-
|
175
|
-
|
176
|
-
<li class="public ">
|
177
|
-
<span class="summary_signature">
|
178
|
-
|
179
|
-
<a href="#class_matches%3F-class_method" title="class_matches? (class method)">.<strong>class_matches?</strong>(type) ⇒ Boolean </a>
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
</span>
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
194
|
-
|
195
|
-
</li>
|
196
|
-
|
197
|
-
|
198
|
-
<li class="public ">
|
199
|
-
<span class="summary_signature">
|
200
|
-
|
201
|
-
<a href="#clear_klasses-class_method" title="clear_klasses (class method)">.<strong>clear_klasses</strong> ⇒ Object </a>
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
</span>
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
216
|
-
|
217
|
-
</li>
|
218
|
-
|
219
|
-
|
220
|
-
<li class="public ">
|
221
|
-
<span class="summary_signature">
|
222
|
-
|
223
|
-
<a href="#clear_symbols-class_method" title="clear_symbols (class method)">.<strong>clear_symbols</strong> ⇒ Object </a>
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
</span>
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
238
|
-
|
239
|
-
</li>
|
240
|
-
|
241
|
-
|
242
|
-
<li class="public ">
|
243
|
-
<span class="summary_signature">
|
244
|
-
|
245
|
-
<a href="#klass-class_method" title="klass (class method)">.<strong>klass</strong>(klass) ⇒ Object </a>
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
</span>
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
260
|
-
|
261
|
-
</li>
|
262
|
-
|
263
|
-
|
264
|
-
<li class="public ">
|
265
|
-
<span class="summary_signature">
|
266
|
-
|
267
|
-
<a href="#option-class_method" title="option (class method)">.<strong>option</strong>(key, default: nil) ⇒ Object </a>
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
</span>
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
282
|
-
|
283
|
-
</li>
|
284
|
-
|
285
|
-
|
286
|
-
<li class="public ">
|
287
|
-
<span class="summary_signature">
|
288
|
-
|
289
|
-
<a href="#register-class_method" title="register (class method)">.<strong>register</strong>(symbols: [], klasses: [], clear: true, before: nil) ⇒ Object </a>
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
</span>
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
304
|
-
|
305
|
-
</li>
|
306
|
-
|
307
|
-
|
308
|
-
<li class="public ">
|
309
|
-
<span class="summary_signature">
|
310
|
-
|
311
|
-
<a href="#symbol-class_method" title="symbol (class method)">.<strong>symbol</strong>(symbol) ⇒ Object </a>
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
</span>
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
326
|
-
|
327
|
-
</li>
|
328
|
-
|
329
|
-
|
330
|
-
<li class="public ">
|
331
|
-
<span class="summary_signature">
|
332
|
-
|
333
|
-
<a href="#symbol_matches%3F-class_method" title="symbol_matches? (class method)">.<strong>symbol_matches?</strong>(type) ⇒ Boolean </a>
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
</span>
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
348
|
-
|
349
|
-
</li>
|
350
|
-
|
351
|
-
|
352
|
-
<li class="public ">
|
353
|
-
<span class="summary_signature">
|
354
|
-
|
355
|
-
<a href="#type_matches%3F-class_method" title="type_matches? (class method)">.<strong>type_matches?</strong>(type) ⇒ Boolean </a>
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
</span>
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
370
|
-
|
371
|
-
</li>
|
372
|
-
|
373
|
-
|
374
|
-
</ul>
|
375
|
-
|
376
|
-
<h2>
|
377
|
-
Instance Method Summary
|
378
|
-
<small><a href="#" class="summary_toggle">collapse</a></small>
|
379
|
-
</h2>
|
380
|
-
|
381
|
-
<ul class="summary">
|
382
|
-
|
383
|
-
<li class="public ">
|
384
|
-
<span class="summary_signature">
|
385
|
-
|
386
|
-
<a href="#exec_block-instance_method" title="#exec_block (instance method)">#<strong>exec_block</strong> ⇒ Object </a>
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
</span>
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
401
|
-
|
402
|
-
</li>
|
403
|
-
|
404
|
-
|
405
|
-
<li class="public ">
|
406
|
-
<span class="summary_signature">
|
407
|
-
|
408
|
-
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(options = {}) ⇒ Node </a>
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
</span>
|
413
|
-
|
414
|
-
|
415
|
-
<span class="note title constructor">constructor</span>
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
<span class="summary_desc"><div class='inline'><p>A new instance of Node.</p>
|
425
|
-
</div></span>
|
426
|
-
|
427
|
-
</li>
|
428
|
-
|
429
|
-
|
430
|
-
<li class="public ">
|
431
|
-
<span class="summary_signature">
|
432
|
-
|
433
|
-
<a href="#option-instance_method" title="#option (instance method)">#<strong>option</strong>(key) ⇒ Object </a>
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
</span>
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
448
|
-
|
449
|
-
</li>
|
450
|
-
|
451
|
-
|
452
|
-
<li class="public ">
|
453
|
-
<span class="summary_signature">
|
454
|
-
|
455
|
-
<a href="#option%3F-instance_method" title="#option? (instance method)">#<strong>option?</strong>(key) ⇒ Boolean </a>
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
</span>
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
470
|
-
|
471
|
-
</li>
|
472
|
-
|
473
|
-
|
474
|
-
<li class="public ">
|
475
|
-
<span class="summary_signature">
|
476
|
-
|
477
|
-
<a href="#resolve_type_klass-instance_method" title="#resolve_type_klass (instance method)">#<strong>resolve_type_klass</strong>(type) ⇒ Object </a>
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
</span>
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
|
490
|
-
|
491
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
492
|
-
|
493
|
-
</li>
|
494
|
-
|
495
|
-
|
496
|
-
<li class="public ">
|
497
|
-
<span class="summary_signature">
|
498
|
-
|
499
|
-
<a href="#type_filter_matches%3F-instance_method" title="#type_filter_matches? (instance method)">#<strong>type_filter_matches?</strong>(data) ⇒ Boolean </a>
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
</span>
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
514
|
-
|
515
|
-
</li>
|
516
|
-
|
517
|
-
|
518
|
-
<li class="public ">
|
519
|
-
<span class="summary_signature">
|
520
|
-
|
521
|
-
<a href="#type_label-instance_method" title="#type_label (instance method)">#<strong>type_label</strong> ⇒ Object </a>
|
522
|
-
|
523
|
-
|
524
|
-
|
525
|
-
</span>
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
536
|
-
|
537
|
-
</li>
|
538
|
-
|
539
|
-
|
540
|
-
<li class="public ">
|
541
|
-
<span class="summary_signature">
|
542
|
-
|
543
|
-
<a href="#type_matches%3F-instance_method" title="#type_matches? (instance method)">#<strong>type_matches?</strong>(data) ⇒ Boolean </a>
|
544
|
-
|
545
|
-
|
546
|
-
|
547
|
-
</span>
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
|
553
|
-
|
554
|
-
|
555
|
-
|
556
|
-
|
557
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
558
|
-
|
559
|
-
</li>
|
560
|
-
|
561
|
-
|
562
|
-
<li class="public ">
|
563
|
-
<span class="summary_signature">
|
564
|
-
|
565
|
-
<a href="#validate-instance_method" title="#validate (instance method)">#<strong>validate</strong>(data, collector) ⇒ Object </a>
|
566
|
-
|
567
|
-
|
568
|
-
|
569
|
-
</span>
|
570
|
-
|
571
|
-
|
572
|
-
|
573
|
-
|
574
|
-
|
575
|
-
|
576
|
-
|
577
|
-
|
578
|
-
|
579
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
580
|
-
|
581
|
-
</li>
|
582
|
-
|
583
|
-
|
584
|
-
</ul>
|
585
|
-
|
586
|
-
|
587
|
-
<div id="constructor_details" class="method_details_list">
|
588
|
-
<h2>Constructor Details</h2>
|
589
|
-
|
590
|
-
<div class="method_details first">
|
591
|
-
<h3 class="signature first" id="initialize-instance_method">
|
592
|
-
|
593
|
-
#<strong>initialize</strong>(options = {}) ⇒ <tt><span class='object_link'><a href="" title="Schemacop::Node (class)">Node</a></span></tt>
|
594
|
-
|
595
|
-
|
596
|
-
|
597
|
-
|
598
|
-
|
599
|
-
</h3><div class="docstring">
|
600
|
-
<div class="discussion">
|
601
|
-
<p>Returns a new instance of Node</p>
|
602
|
-
|
603
|
-
|
604
|
-
</div>
|
605
|
-
</div>
|
606
|
-
<div class="tags">
|
607
|
-
|
608
|
-
|
609
|
-
</div><table class="source_code">
|
610
|
-
<tr>
|
611
|
-
<td>
|
612
|
-
<pre class="lines">
|
613
|
-
|
614
|
-
|
615
|
-
78
|
616
|
-
79
|
617
|
-
80
|
618
|
-
81
|
619
|
-
82
|
620
|
-
83
|
621
|
-
84
|
622
|
-
85
|
623
|
-
86
|
624
|
-
87
|
625
|
-
88
|
626
|
-
89
|
627
|
-
90
|
628
|
-
91</pre>
|
629
|
-
</td>
|
630
|
-
<td>
|
631
|
-
<pre class="code"><span class="info file"># File 'lib/schemacop/node.rb', line 78</span>
|
632
|
-
|
633
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
634
|
-
<span class='comment'># Check and save given options
|
635
|
-
</span> <span class='ivar'>@options</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_allowed_options'>allowed_options</span><span class='period'>.</span><span class='id identifier rubyid_merge'>merge</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
|
636
|
-
<span class='kw'>if</span> <span class='lparen'>(</span><span class='id identifier rubyid_obsolete_opts'>obsolete_opts</span> <span class='op'>=</span> <span class='ivar'>@options</span><span class='period'>.</span><span class='id identifier rubyid_keys'>keys</span> <span class='op'>-</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_allowed_options'>allowed_options</span><span class='period'>.</span><span class='id identifier rubyid_keys'>keys</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_any?'>any?</span>
|
637
|
-
<span class='id identifier rubyid_fail'>fail</span> <span class='const'><span class='object_link'><a href="Exceptions.html" title="Schemacop::Exceptions (module)">Exceptions</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Exceptions/InvalidSchemaError.html" title="Schemacop::Exceptions::InvalidSchemaError (class)">InvalidSchemaError</a></span></span><span class='comma'>,</span>
|
638
|
-
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Unrecognized option(s) </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_obsolete_opts'>obsolete_opts</span><span class='period'>.</span><span class='id identifier rubyid_inspect'>inspect</span><span class='embexpr_end'>}</span><span class='tstring_content'> for </span><span class='embexpr_beg'>#{</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_inspect'>inspect</span><span class='embexpr_end'>}</span><span class='tstring_content'>, allowed options: </span><span class='embexpr_beg'>#{</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_allowed_options'>allowed_options</span><span class='period'>.</span><span class='id identifier rubyid_keys'>keys</span><span class='period'>.</span><span class='id identifier rubyid_inspect'>inspect</span><span class='embexpr_end'>}</span><span class='tstring_content'>.</span><span class='tstring_end'>"</span></span>
|
639
|
-
<span class='kw'>end</span>
|
640
|
-
|
641
|
-
<span class='kw'>if</span> <span class='id identifier rubyid_option?'>option?</span><span class='lparen'>(</span><span class='symbol'>:cast</span><span class='rparen'>)</span> <span class='op'>&&</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_klasses'>klasses</span><span class='period'>.</span><span class='id identifier rubyid_size'>size</span> <span class='op'>></span> <span class='int'>1</span>
|
642
|
-
<span class='id identifier rubyid_fail'>fail</span> <span class='const'><span class='object_link'><a href="Exceptions.html" title="Schemacop::Exceptions (module)">Exceptions</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Exceptions/InvalidSchemaError.html" title="Schemacop::Exceptions::InvalidSchemaError (class)">InvalidSchemaError</a></span></span><span class='comma'>,</span>
|
643
|
-
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Casting is only allowed for single-value datatypes, but type </span><span class='embexpr_beg'>#{</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_inspect'>inspect</span><span class='embexpr_end'>}</span><span class='tstring_content'> has classes </span><span class='tstring_end'>"</span></span>\
|
644
|
-
<span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_klasses'>klasses</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span><span class='lparen'>(</span><span class='op'>&</span><span class='symbol'>:inspect</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'>.</span><span class='tstring_end'>"</span></span>
|
645
|
-
<span class='kw'>end</span>
|
646
|
-
<span class='kw'>end</span></pre>
|
647
|
-
</td>
|
648
|
-
</tr>
|
649
|
-
</table>
|
650
|
-
</div>
|
651
|
-
|
652
|
-
</div>
|
653
|
-
|
654
|
-
<div id="instance_attr_details" class="attr_details">
|
655
|
-
<h2>Instance Attribute Details</h2>
|
656
|
-
|
657
|
-
|
658
|
-
<span id=""></span>
|
659
|
-
<div class="method_details first">
|
660
|
-
<h3 class="signature first" id="options-instance_method">
|
661
|
-
|
662
|
-
#<strong>options</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span>
|
663
|
-
|
664
|
-
|
665
|
-
|
666
|
-
|
667
|
-
|
668
|
-
</h3><div class="docstring">
|
669
|
-
<div class="discussion">
|
670
|
-
<p>Returns the value of attribute options</p>
|
671
|
-
|
672
|
-
|
673
|
-
</div>
|
674
|
-
</div>
|
675
|
-
<div class="tags">
|
676
|
-
|
677
|
-
|
678
|
-
</div><table class="source_code">
|
679
|
-
<tr>
|
680
|
-
<td>
|
681
|
-
<pre class="lines">
|
682
|
-
|
683
|
-
|
684
|
-
3
|
685
|
-
4
|
686
|
-
5</pre>
|
687
|
-
</td>
|
688
|
-
<td>
|
689
|
-
<pre class="code"><span class="info file"># File 'lib/schemacop/node.rb', line 3</span>
|
690
|
-
|
691
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_options'>options</span>
|
692
|
-
<span class='ivar'>@options</span>
|
693
|
-
<span class='kw'>end</span></pre>
|
694
|
-
</td>
|
695
|
-
</tr>
|
696
|
-
</table>
|
697
|
-
</div>
|
698
|
-
|
699
|
-
</div>
|
700
|
-
|
701
|
-
|
702
|
-
<div id="class_method_details" class="method_details_list">
|
703
|
-
<h2>Class Method Details</h2>
|
704
|
-
|
705
|
-
|
706
|
-
<div class="method_details first">
|
707
|
-
<h3 class="signature first" id="build-class_method">
|
708
|
-
|
709
|
-
.<strong>build</strong>(options, &block) ⇒ <tt>Object</tt>
|
710
|
-
|
711
|
-
|
712
|
-
|
713
|
-
|
714
|
-
|
715
|
-
</h3><table class="source_code">
|
716
|
-
<tr>
|
717
|
-
<td>
|
718
|
-
<pre class="lines">
|
719
|
-
|
720
|
-
|
721
|
-
74
|
722
|
-
75
|
723
|
-
76</pre>
|
724
|
-
</td>
|
725
|
-
<td>
|
726
|
-
<pre class="code"><span class="info file"># File 'lib/schemacop/node.rb', line 74</span>
|
727
|
-
|
728
|
-
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_build'>build</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='comma'>,</span> <span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
|
729
|
-
<span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='comma'>,</span> <span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
|
730
|
-
<span class='kw'>end</span></pre>
|
731
|
-
</td>
|
732
|
-
</tr>
|
733
|
-
</table>
|
734
|
-
</div>
|
735
|
-
|
736
|
-
<div class="method_details ">
|
737
|
-
<h3 class="signature " id="class_matches?-class_method">
|
738
|
-
|
739
|
-
.<strong>class_matches?</strong>(type) ⇒ <tt>Boolean</tt>
|
740
|
-
|
741
|
-
|
742
|
-
|
743
|
-
|
744
|
-
|
745
|
-
</h3><div class="docstring">
|
746
|
-
<div class="discussion">
|
747
|
-
|
748
|
-
|
749
|
-
</div>
|
750
|
-
</div>
|
751
|
-
<div class="tags">
|
752
|
-
|
753
|
-
<p class="tag_title">Returns:</p>
|
754
|
-
<ul class="return">
|
755
|
-
|
756
|
-
<li>
|
757
|
-
|
758
|
-
|
759
|
-
<span class='type'>(<tt>Boolean</tt>)</span>
|
760
|
-
|
761
|
-
|
762
|
-
|
763
|
-
</li>
|
764
|
-
|
765
|
-
</ul>
|
766
|
-
|
767
|
-
</div><table class="source_code">
|
768
|
-
<tr>
|
769
|
-
<td>
|
770
|
-
<pre class="lines">
|
771
|
-
|
772
|
-
|
773
|
-
66
|
774
|
-
67
|
775
|
-
68
|
776
|
-
69
|
777
|
-
70
|
778
|
-
71
|
779
|
-
72</pre>
|
780
|
-
</td>
|
781
|
-
<td>
|
782
|
-
<pre class="code"><span class="info file"># File 'lib/schemacop/node.rb', line 66</span>
|
783
|
-
|
784
|
-
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class_matches?'>class_matches?</span><span class='lparen'>(</span><span class='id identifier rubyid_type'>type</span><span class='rparen'>)</span>
|
785
|
-
<span class='kw'>return</span> <span class='kw'>false</span> <span class='kw'>unless</span> <span class='id identifier rubyid_type'>type</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Class</span><span class='rparen'>)</span>
|
786
|
-
<span class='id identifier rubyid_klasses'>klasses</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_klass'>klass</span><span class='op'>|</span>
|
787
|
-
<span class='kw'>return</span> <span class='kw'>true</span> <span class='kw'>if</span> <span class='id identifier rubyid_type'>type</span> <span class='op'><=</span> <span class='id identifier rubyid_klass'>klass</span>
|
788
|
-
<span class='kw'>end</span>
|
789
|
-
<span class='kw'>return</span> <span class='kw'>false</span>
|
790
|
-
<span class='kw'>end</span></pre>
|
791
|
-
</td>
|
792
|
-
</tr>
|
793
|
-
</table>
|
794
|
-
</div>
|
795
|
-
|
796
|
-
<div class="method_details ">
|
797
|
-
<h3 class="signature " id="clear_klasses-class_method">
|
798
|
-
|
799
|
-
.<strong>clear_klasses</strong> ⇒ <tt>Object</tt>
|
800
|
-
|
801
|
-
|
802
|
-
|
803
|
-
|
804
|
-
|
805
|
-
</h3><table class="source_code">
|
806
|
-
<tr>
|
807
|
-
<td>
|
808
|
-
<pre class="lines">
|
809
|
-
|
810
|
-
|
811
|
-
41
|
812
|
-
42
|
813
|
-
43</pre>
|
814
|
-
</td>
|
815
|
-
<td>
|
816
|
-
<pre class="code"><span class="info file"># File 'lib/schemacop/node.rb', line 41</span>
|
817
|
-
|
818
|
-
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_clear_klasses'>clear_klasses</span>
|
819
|
-
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_klasses'>klasses</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_freeze'>freeze</span>
|
820
|
-
<span class='kw'>end</span></pre>
|
821
|
-
</td>
|
822
|
-
</tr>
|
823
|
-
</table>
|
824
|
-
</div>
|
825
|
-
|
826
|
-
<div class="method_details ">
|
827
|
-
<h3 class="signature " id="clear_symbols-class_method">
|
828
|
-
|
829
|
-
.<strong>clear_symbols</strong> ⇒ <tt>Object</tt>
|
830
|
-
|
831
|
-
|
832
|
-
|
833
|
-
|
834
|
-
|
835
|
-
</h3><table class="source_code">
|
836
|
-
<tr>
|
837
|
-
<td>
|
838
|
-
<pre class="lines">
|
839
|
-
|
840
|
-
|
841
|
-
33
|
842
|
-
34
|
843
|
-
35</pre>
|
844
|
-
</td>
|
845
|
-
<td>
|
846
|
-
<pre class="code"><span class="info file"># File 'lib/schemacop/node.rb', line 33</span>
|
847
|
-
|
848
|
-
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_clear_symbols'>clear_symbols</span>
|
849
|
-
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_symbols'>symbols</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_freeze'>freeze</span>
|
850
|
-
<span class='kw'>end</span></pre>
|
851
|
-
</td>
|
852
|
-
</tr>
|
853
|
-
</table>
|
854
|
-
</div>
|
855
|
-
|
856
|
-
<div class="method_details ">
|
857
|
-
<h3 class="signature " id="klass-class_method">
|
858
|
-
|
859
|
-
.<strong>klass</strong>(klass) ⇒ <tt>Object</tt>
|
860
|
-
|
861
|
-
|
862
|
-
|
863
|
-
|
864
|
-
|
865
|
-
</h3><table class="source_code">
|
866
|
-
<tr>
|
867
|
-
<td>
|
868
|
-
<pre class="lines">
|
869
|
-
|
870
|
-
|
871
|
-
37
|
872
|
-
38
|
873
|
-
39</pre>
|
874
|
-
</td>
|
875
|
-
<td>
|
876
|
-
<pre class="code"><span class="info file"># File 'lib/schemacop/node.rb', line 37</span>
|
877
|
-
|
878
|
-
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_klass'>klass</span><span class='lparen'>(</span><span class='id identifier rubyid_klass'>klass</span><span class='rparen'>)</span>
|
879
|
-
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_klasses'>klasses</span> <span class='op'>+=</span> <span class='lbracket'>[</span><span class='id identifier rubyid_klass'>klass</span><span class='rbracket'>]</span>
|
880
|
-
<span class='kw'>end</span></pre>
|
881
|
-
</td>
|
882
|
-
</tr>
|
883
|
-
</table>
|
884
|
-
</div>
|
885
|
-
|
886
|
-
<div class="method_details ">
|
887
|
-
<h3 class="signature " id="option-class_method">
|
888
|
-
|
889
|
-
.<strong>option</strong>(key, default: nil) ⇒ <tt>Object</tt>
|
890
|
-
|
891
|
-
|
892
|
-
|
893
|
-
|
894
|
-
|
895
|
-
</h3><table class="source_code">
|
896
|
-
<tr>
|
897
|
-
<td>
|
898
|
-
<pre class="lines">
|
899
|
-
|
900
|
-
|
901
|
-
14
|
902
|
-
15
|
903
|
-
16</pre>
|
904
|
-
</td>
|
905
|
-
<td>
|
906
|
-
<pre class="code"><span class="info file"># File 'lib/schemacop/node.rb', line 14</span>
|
907
|
-
|
908
|
-
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_option'>option</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='label'>default:</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
909
|
-
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_allowed_options'>allowed_options</span> <span class='op'>=</span> <span class='id identifier rubyid_allowed_options'>allowed_options</span><span class='period'>.</span><span class='id identifier rubyid_merge'>merge</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span> <span class='op'>=></span> <span class='id identifier rubyid_default'>default</span><span class='rparen'>)</span>
|
910
|
-
<span class='kw'>end</span></pre>
|
911
|
-
</td>
|
912
|
-
</tr>
|
913
|
-
</table>
|
914
|
-
</div>
|
915
|
-
|
916
|
-
<div class="method_details ">
|
917
|
-
<h3 class="signature " id="register-class_method">
|
918
|
-
|
919
|
-
.<strong>register</strong>(symbols: [], klasses: [], clear: true, before: nil) ⇒ <tt>Object</tt>
|
920
|
-
|
921
|
-
|
922
|
-
|
923
|
-
|
924
|
-
|
925
|
-
</h3><table class="source_code">
|
926
|
-
<tr>
|
927
|
-
<td>
|
928
|
-
<pre class="lines">
|
929
|
-
|
930
|
-
|
931
|
-
45
|
932
|
-
46
|
933
|
-
47
|
934
|
-
48
|
935
|
-
49
|
936
|
-
50
|
937
|
-
51
|
938
|
-
52
|
939
|
-
53
|
940
|
-
54
|
941
|
-
55</pre>
|
942
|
-
</td>
|
943
|
-
<td>
|
944
|
-
<pre class="code"><span class="info file"># File 'lib/schemacop/node.rb', line 45</span>
|
945
|
-
|
946
|
-
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_register'>register</span><span class='lparen'>(</span><span class='label'>symbols:</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='label'>klasses:</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='label'>clear:</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='label'>before:</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
947
|
-
<span class='const'><span class='object_link'><a href="NodeResolver.html" title="Schemacop::NodeResolver (class)">NodeResolver</a></span></span><span class='period'>.</span><span class='id identifier rubyid_register'><span class='object_link'><a href="NodeResolver.html#register-class_method" title="Schemacop::NodeResolver.register (method)">register</a></span></span><span class='lparen'>(</span><span class='kw'>self</span><span class='comma'>,</span> <span class='label'>before:</span> <span class='id identifier rubyid_before'>before</span><span class='rparen'>)</span>
|
948
|
-
<span class='id identifier rubyid_symbols'>symbols</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='op'>*</span><span class='id identifier rubyid_symbols'>symbols</span><span class='rbracket'>]</span>
|
949
|
-
<span class='id identifier rubyid_klasses'>klasses</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='op'>*</span><span class='id identifier rubyid_klasses'>klasses</span><span class='rbracket'>]</span>
|
950
|
-
<span class='kw'>if</span> <span class='id identifier rubyid_clear'>clear</span>
|
951
|
-
<span class='id identifier rubyid_clear_symbols'>clear_symbols</span>
|
952
|
-
<span class='id identifier rubyid_clear_klasses'>clear_klasses</span>
|
953
|
-
<span class='kw'>end</span>
|
954
|
-
<span class='id identifier rubyid_symbols'>symbols</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_s'>s</span><span class='op'>|</span> <span class='id identifier rubyid_symbol'>symbol</span> <span class='id identifier rubyid_s'>s</span> <span class='rbrace'>}</span>
|
955
|
-
<span class='id identifier rubyid_klasses'>klasses</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_k'>k</span><span class='op'>|</span> <span class='id identifier rubyid_klass'>klass</span> <span class='id identifier rubyid_k'>k</span> <span class='rbrace'>}</span>
|
956
|
-
<span class='kw'>end</span></pre>
|
957
|
-
</td>
|
958
|
-
</tr>
|
959
|
-
</table>
|
960
|
-
</div>
|
961
|
-
|
962
|
-
<div class="method_details ">
|
963
|
-
<h3 class="signature " id="symbol-class_method">
|
964
|
-
|
965
|
-
.<strong>symbol</strong>(symbol) ⇒ <tt>Object</tt>
|
966
|
-
|
967
|
-
|
968
|
-
|
969
|
-
|
970
|
-
|
971
|
-
</h3><table class="source_code">
|
972
|
-
<tr>
|
973
|
-
<td>
|
974
|
-
<pre class="lines">
|
975
|
-
|
976
|
-
|
977
|
-
29
|
978
|
-
30
|
979
|
-
31</pre>
|
980
|
-
</td>
|
981
|
-
<td>
|
982
|
-
<pre class="code"><span class="info file"># File 'lib/schemacop/node.rb', line 29</span>
|
983
|
-
|
984
|
-
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_symbol'>symbol</span><span class='lparen'>(</span><span class='id identifier rubyid_symbol'>symbol</span><span class='rparen'>)</span>
|
985
|
-
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_symbols'>symbols</span> <span class='op'>+=</span> <span class='lbracket'>[</span><span class='id identifier rubyid_symbol'>symbol</span><span class='rbracket'>]</span>
|
986
|
-
<span class='kw'>end</span></pre>
|
987
|
-
</td>
|
988
|
-
</tr>
|
989
|
-
</table>
|
990
|
-
</div>
|
991
|
-
|
992
|
-
<div class="method_details ">
|
993
|
-
<h3 class="signature " id="symbol_matches?-class_method">
|
994
|
-
|
995
|
-
.<strong>symbol_matches?</strong>(type) ⇒ <tt>Boolean</tt>
|
996
|
-
|
997
|
-
|
998
|
-
|
999
|
-
|
1000
|
-
|
1001
|
-
</h3><div class="docstring">
|
1002
|
-
<div class="discussion">
|
1003
|
-
|
1004
|
-
|
1005
|
-
</div>
|
1006
|
-
</div>
|
1007
|
-
<div class="tags">
|
1008
|
-
|
1009
|
-
<p class="tag_title">Returns:</p>
|
1010
|
-
<ul class="return">
|
1011
|
-
|
1012
|
-
<li>
|
1013
|
-
|
1014
|
-
|
1015
|
-
<span class='type'>(<tt>Boolean</tt>)</span>
|
1016
|
-
|
1017
|
-
|
1018
|
-
|
1019
|
-
</li>
|
1020
|
-
|
1021
|
-
</ul>
|
1022
|
-
|
1023
|
-
</div><table class="source_code">
|
1024
|
-
<tr>
|
1025
|
-
<td>
|
1026
|
-
<pre class="lines">
|
1027
|
-
|
1028
|
-
|
1029
|
-
61
|
1030
|
-
62
|
1031
|
-
63
|
1032
|
-
64</pre>
|
1033
|
-
</td>
|
1034
|
-
<td>
|
1035
|
-
<pre class="code"><span class="info file"># File 'lib/schemacop/node.rb', line 61</span>
|
1036
|
-
|
1037
|
-
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_symbol_matches?'>symbol_matches?</span><span class='lparen'>(</span><span class='id identifier rubyid_type'>type</span><span class='rparen'>)</span>
|
1038
|
-
<span class='kw'>return</span> <span class='kw'>false</span> <span class='kw'>unless</span> <span class='id identifier rubyid_type'>type</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Symbol</span><span class='rparen'>)</span>
|
1039
|
-
<span class='id identifier rubyid_symbols'>symbols</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='id identifier rubyid_type'>type</span><span class='rparen'>)</span>
|
1040
|
-
<span class='kw'>end</span></pre>
|
1041
|
-
</td>
|
1042
|
-
</tr>
|
1043
|
-
</table>
|
1044
|
-
</div>
|
1045
|
-
|
1046
|
-
<div class="method_details ">
|
1047
|
-
<h3 class="signature " id="type_matches?-class_method">
|
1048
|
-
|
1049
|
-
.<strong>type_matches?</strong>(type) ⇒ <tt>Boolean</tt>
|
1050
|
-
|
1051
|
-
|
1052
|
-
|
1053
|
-
|
1054
|
-
|
1055
|
-
</h3><div class="docstring">
|
1056
|
-
<div class="discussion">
|
1057
|
-
|
1058
|
-
|
1059
|
-
</div>
|
1060
|
-
</div>
|
1061
|
-
<div class="tags">
|
1062
|
-
|
1063
|
-
<p class="tag_title">Returns:</p>
|
1064
|
-
<ul class="return">
|
1065
|
-
|
1066
|
-
<li>
|
1067
|
-
|
1068
|
-
|
1069
|
-
<span class='type'>(<tt>Boolean</tt>)</span>
|
1070
|
-
|
1071
|
-
|
1072
|
-
|
1073
|
-
</li>
|
1074
|
-
|
1075
|
-
</ul>
|
1076
|
-
|
1077
|
-
</div><table class="source_code">
|
1078
|
-
<tr>
|
1079
|
-
<td>
|
1080
|
-
<pre class="lines">
|
1081
|
-
|
1082
|
-
|
1083
|
-
57
|
1084
|
-
58
|
1085
|
-
59</pre>
|
1086
|
-
</td>
|
1087
|
-
<td>
|
1088
|
-
<pre class="code"><span class="info file"># File 'lib/schemacop/node.rb', line 57</span>
|
1089
|
-
|
1090
|
-
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_type_matches?'>type_matches?</span><span class='lparen'>(</span><span class='id identifier rubyid_type'>type</span><span class='rparen'>)</span>
|
1091
|
-
<span class='id identifier rubyid_symbol_matches?'>symbol_matches?</span><span class='lparen'>(</span><span class='id identifier rubyid_type'>type</span><span class='rparen'>)</span> <span class='op'>||</span> <span class='id identifier rubyid_class_matches?'>class_matches?</span><span class='lparen'>(</span><span class='id identifier rubyid_type'>type</span><span class='rparen'>)</span>
|
1092
|
-
<span class='kw'>end</span></pre>
|
1093
|
-
</td>
|
1094
|
-
</tr>
|
1095
|
-
</table>
|
1096
|
-
</div>
|
1097
|
-
|
1098
|
-
</div>
|
1099
|
-
|
1100
|
-
<div id="instance_method_details" class="method_details_list">
|
1101
|
-
<h2>Instance Method Details</h2>
|
1102
|
-
|
1103
|
-
|
1104
|
-
<div class="method_details first">
|
1105
|
-
<h3 class="signature first" id="exec_block-instance_method">
|
1106
|
-
|
1107
|
-
#<strong>exec_block</strong> ⇒ <tt>Object</tt>
|
1108
|
-
|
1109
|
-
|
1110
|
-
|
1111
|
-
|
1112
|
-
|
1113
|
-
</h3><table class="source_code">
|
1114
|
-
<tr>
|
1115
|
-
<td>
|
1116
|
-
<pre class="lines">
|
1117
|
-
|
1118
|
-
|
1119
|
-
103
|
1120
|
-
104
|
1121
|
-
105</pre>
|
1122
|
-
</td>
|
1123
|
-
<td>
|
1124
|
-
<pre class="code"><span class="info file"># File 'lib/schemacop/node.rb', line 103</span>
|
1125
|
-
|
1126
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_exec_block'>exec_block</span>
|
1127
|
-
<span class='id identifier rubyid_fail'>fail</span> <span class='const'><span class='object_link'><a href="Exceptions.html" title="Schemacop::Exceptions (module)">Exceptions</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Exceptions/InvalidSchemaError.html" title="Schemacop::Exceptions::InvalidSchemaError (class)">InvalidSchemaError</a></span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Node does not support block.</span><span class='tstring_end'>'</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_block_given?'>block_given?</span>
|
1128
|
-
<span class='kw'>end</span></pre>
|
1129
|
-
</td>
|
1130
|
-
</tr>
|
1131
|
-
</table>
|
1132
|
-
</div>
|
1133
|
-
|
1134
|
-
<div class="method_details ">
|
1135
|
-
<h3 class="signature " id="option-instance_method">
|
1136
|
-
|
1137
|
-
#<strong>option</strong>(key) ⇒ <tt>Object</tt>
|
1138
|
-
|
1139
|
-
|
1140
|
-
|
1141
|
-
|
1142
|
-
|
1143
|
-
</h3><table class="source_code">
|
1144
|
-
<tr>
|
1145
|
-
<td>
|
1146
|
-
<pre class="lines">
|
1147
|
-
|
1148
|
-
|
1149
|
-
93
|
1150
|
-
94
|
1151
|
-
95</pre>
|
1152
|
-
</td>
|
1153
|
-
<td>
|
1154
|
-
<pre class="code"><span class="info file"># File 'lib/schemacop/node.rb', line 93</span>
|
1155
|
-
|
1156
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_option'>option</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='rparen'>)</span>
|
1157
|
-
<span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='id identifier rubyid_key'>key</span><span class='rbracket'>]</span>
|
1158
|
-
<span class='kw'>end</span></pre>
|
1159
|
-
</td>
|
1160
|
-
</tr>
|
1161
|
-
</table>
|
1162
|
-
</div>
|
1163
|
-
|
1164
|
-
<div class="method_details ">
|
1165
|
-
<h3 class="signature " id="option?-instance_method">
|
1166
|
-
|
1167
|
-
#<strong>option?</strong>(key) ⇒ <tt>Boolean</tt>
|
1168
|
-
|
1169
|
-
|
1170
|
-
|
1171
|
-
|
1172
|
-
|
1173
|
-
</h3><div class="docstring">
|
1174
|
-
<div class="discussion">
|
1175
|
-
|
1176
|
-
|
1177
|
-
</div>
|
1178
|
-
</div>
|
1179
|
-
<div class="tags">
|
1180
|
-
|
1181
|
-
<p class="tag_title">Returns:</p>
|
1182
|
-
<ul class="return">
|
1183
|
-
|
1184
|
-
<li>
|
1185
|
-
|
1186
|
-
|
1187
|
-
<span class='type'>(<tt>Boolean</tt>)</span>
|
1188
|
-
|
1189
|
-
|
1190
|
-
|
1191
|
-
</li>
|
1192
|
-
|
1193
|
-
</ul>
|
1194
|
-
|
1195
|
-
</div><table class="source_code">
|
1196
|
-
<tr>
|
1197
|
-
<td>
|
1198
|
-
<pre class="lines">
|
1199
|
-
|
1200
|
-
|
1201
|
-
97
|
1202
|
-
98
|
1203
|
-
99
|
1204
|
-
100
|
1205
|
-
101</pre>
|
1206
|
-
</td>
|
1207
|
-
<td>
|
1208
|
-
<pre class="code"><span class="info file"># File 'lib/schemacop/node.rb', line 97</span>
|
1209
|
-
|
1210
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_option?'>option?</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='rparen'>)</span>
|
1211
|
-
<span class='comment'># rubocop:disable Style/DoubleNegation
|
1212
|
-
</span> <span class='op'>!</span><span class='op'>!</span><span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='id identifier rubyid_key'>key</span><span class='rbracket'>]</span>
|
1213
|
-
<span class='comment'># rubocop:enable Style/DoubleNegation
|
1214
|
-
</span><span class='kw'>end</span></pre>
|
1215
|
-
</td>
|
1216
|
-
</tr>
|
1217
|
-
</table>
|
1218
|
-
</div>
|
1219
|
-
|
1220
|
-
<div class="method_details ">
|
1221
|
-
<h3 class="signature " id="resolve_type_klass-instance_method">
|
1222
|
-
|
1223
|
-
#<strong>resolve_type_klass</strong>(type) ⇒ <tt>Object</tt>
|
1224
|
-
|
1225
|
-
|
1226
|
-
|
1227
|
-
|
1228
|
-
|
1229
|
-
</h3><table class="source_code">
|
1230
|
-
<tr>
|
1231
|
-
<td>
|
1232
|
-
<pre class="lines">
|
1233
|
-
|
1234
|
-
|
1235
|
-
107
|
1236
|
-
108
|
1237
|
-
109
|
1238
|
-
110
|
1239
|
-
111
|
1240
|
-
112
|
1241
|
-
113</pre>
|
1242
|
-
</td>
|
1243
|
-
<td>
|
1244
|
-
<pre class="code"><span class="info file"># File 'lib/schemacop/node.rb', line 107</span>
|
1245
|
-
|
1246
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_resolve_type_klass'>resolve_type_klass</span><span class='lparen'>(</span><span class='id identifier rubyid_type'>type</span><span class='rparen'>)</span>
|
1247
|
-
<span class='id identifier rubyid_klass'>klass</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="NodeResolver.html" title="Schemacop::NodeResolver (class)">NodeResolver</a></span></span><span class='period'>.</span><span class='id identifier rubyid_resolve'><span class='object_link'><a href="NodeResolver.html#resolve-class_method" title="Schemacop::NodeResolver.resolve (method)">resolve</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_type'>type</span><span class='rparen'>)</span>
|
1248
|
-
<span class='kw'>unless</span> <span class='id identifier rubyid_klass'>klass</span>
|
1249
|
-
<span class='id identifier rubyid_fail'>fail</span> <span class='const'><span class='object_link'><a href="Exceptions.html" title="Schemacop::Exceptions (module)">Exceptions</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Exceptions/InvalidSchemaError.html" title="Schemacop::Exceptions::InvalidSchemaError (class)">InvalidSchemaError</a></span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>No validation class found for type </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_type'>type</span><span class='period'>.</span><span class='id identifier rubyid_inspect'>inspect</span><span class='embexpr_end'>}</span><span class='tstring_content'>.</span><span class='tstring_end'>"</span></span>
|
1250
|
-
<span class='kw'>end</span>
|
1251
|
-
<span class='kw'>return</span> <span class='id identifier rubyid_klass'>klass</span>
|
1252
|
-
<span class='kw'>end</span></pre>
|
1253
|
-
</td>
|
1254
|
-
</tr>
|
1255
|
-
</table>
|
1256
|
-
</div>
|
1257
|
-
|
1258
|
-
<div class="method_details ">
|
1259
|
-
<h3 class="signature " id="type_filter_matches?-instance_method">
|
1260
|
-
|
1261
|
-
#<strong>type_filter_matches?</strong>(data) ⇒ <tt>Boolean</tt>
|
1262
|
-
|
1263
|
-
|
1264
|
-
|
1265
|
-
|
1266
|
-
|
1267
|
-
</h3><div class="docstring">
|
1268
|
-
<div class="discussion">
|
1269
|
-
|
1270
|
-
|
1271
|
-
</div>
|
1272
|
-
</div>
|
1273
|
-
<div class="tags">
|
1274
|
-
|
1275
|
-
<p class="tag_title">Returns:</p>
|
1276
|
-
<ul class="return">
|
1277
|
-
|
1278
|
-
<li>
|
1279
|
-
|
1280
|
-
|
1281
|
-
<span class='type'>(<tt>Boolean</tt>)</span>
|
1282
|
-
|
1283
|
-
|
1284
|
-
|
1285
|
-
</li>
|
1286
|
-
|
1287
|
-
</ul>
|
1288
|
-
|
1289
|
-
</div><table class="source_code">
|
1290
|
-
<tr>
|
1291
|
-
<td>
|
1292
|
-
<pre class="lines">
|
1293
|
-
|
1294
|
-
|
1295
|
-
123
|
1296
|
-
124
|
1297
|
-
125</pre>
|
1298
|
-
</td>
|
1299
|
-
<td>
|
1300
|
-
<pre class="code"><span class="info file"># File 'lib/schemacop/node.rb', line 123</span>
|
1301
|
-
|
1302
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_type_filter_matches?'>type_filter_matches?</span><span class='lparen'>(</span><span class='id identifier rubyid_data'>data</span><span class='rparen'>)</span>
|
1303
|
-
<span class='op'>!</span><span class='id identifier rubyid_option?'>option?</span><span class='lparen'>(</span><span class='symbol'>:if</span><span class='rparen'>)</span> <span class='op'>||</span> <span class='id identifier rubyid_option'>option</span><span class='lparen'>(</span><span class='symbol'>:if</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span><span class='lparen'>(</span><span class='id identifier rubyid_data'>data</span><span class='rparen'>)</span>
|
1304
|
-
<span class='kw'>end</span></pre>
|
1305
|
-
</td>
|
1306
|
-
</tr>
|
1307
|
-
</table>
|
1308
|
-
</div>
|
1309
|
-
|
1310
|
-
<div class="method_details ">
|
1311
|
-
<h3 class="signature " id="type_label-instance_method">
|
1312
|
-
|
1313
|
-
#<strong>type_label</strong> ⇒ <tt>Object</tt>
|
1314
|
-
|
1315
|
-
|
1316
|
-
|
1317
|
-
|
1318
|
-
|
1319
|
-
</h3><table class="source_code">
|
1320
|
-
<tr>
|
1321
|
-
<td>
|
1322
|
-
<pre class="lines">
|
1323
|
-
|
1324
|
-
|
1325
|
-
23
|
1326
|
-
24
|
1327
|
-
25
|
1328
|
-
26
|
1329
|
-
27</pre>
|
1330
|
-
</td>
|
1331
|
-
<td>
|
1332
|
-
<pre class="code"><span class="info file"># File 'lib/schemacop/node.rb', line 23</span>
|
1333
|
-
|
1334
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_type_label'>type_label</span>
|
1335
|
-
<span class='id identifier rubyid_str'>str</span> <span class='op'>=</span> <span class='lparen'>(</span><span class='id identifier rubyid_symbols'>symbols</span><span class='period'>.</span><span class='id identifier rubyid_first'>first</span> <span class='op'>||</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>unknown</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span>
|
1336
|
-
<span class='id identifier rubyid_str'>str</span> <span class='op'>+=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>*</span><span class='tstring_end'>'</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_option?'>option?</span><span class='lparen'>(</span><span class='symbol'>:if</span><span class='rparen'>)</span>
|
1337
|
-
<span class='kw'>return</span> <span class='id identifier rubyid_str'>str</span>
|
1338
|
-
<span class='kw'>end</span></pre>
|
1339
|
-
</td>
|
1340
|
-
</tr>
|
1341
|
-
</table>
|
1342
|
-
</div>
|
1343
|
-
|
1344
|
-
<div class="method_details ">
|
1345
|
-
<h3 class="signature " id="type_matches?-instance_method">
|
1346
|
-
|
1347
|
-
#<strong>type_matches?</strong>(data) ⇒ <tt>Boolean</tt>
|
1348
|
-
|
1349
|
-
|
1350
|
-
|
1351
|
-
|
1352
|
-
|
1353
|
-
</h3><div class="docstring">
|
1354
|
-
<div class="discussion">
|
1355
|
-
|
1356
|
-
|
1357
|
-
</div>
|
1358
|
-
</div>
|
1359
|
-
<div class="tags">
|
1360
|
-
|
1361
|
-
<p class="tag_title">Returns:</p>
|
1362
|
-
<ul class="return">
|
1363
|
-
|
1364
|
-
<li>
|
1365
|
-
|
1366
|
-
|
1367
|
-
<span class='type'>(<tt>Boolean</tt>)</span>
|
1368
|
-
|
1369
|
-
|
1370
|
-
|
1371
|
-
</li>
|
1372
|
-
|
1373
|
-
</ul>
|
1374
|
-
|
1375
|
-
</div><table class="source_code">
|
1376
|
-
<tr>
|
1377
|
-
<td>
|
1378
|
-
<pre class="lines">
|
1379
|
-
|
1380
|
-
|
1381
|
-
119
|
1382
|
-
120
|
1383
|
-
121</pre>
|
1384
|
-
</td>
|
1385
|
-
<td>
|
1386
|
-
<pre class="code"><span class="info file"># File 'lib/schemacop/node.rb', line 119</span>
|
1387
|
-
|
1388
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_type_matches?'>type_matches?</span><span class='lparen'>(</span><span class='id identifier rubyid_data'>data</span><span class='rparen'>)</span>
|
1389
|
-
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_type_matches?'>type_matches?</span><span class='lparen'>(</span><span class='id identifier rubyid_data'>data</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='rparen'>)</span> <span class='op'>&&</span> <span class='id identifier rubyid_type_filter_matches?'>type_filter_matches?</span><span class='lparen'>(</span><span class='id identifier rubyid_data'>data</span><span class='rparen'>)</span>
|
1390
|
-
<span class='kw'>end</span></pre>
|
1391
|
-
</td>
|
1392
|
-
</tr>
|
1393
|
-
</table>
|
1394
|
-
</div>
|
1395
|
-
|
1396
|
-
<div class="method_details ">
|
1397
|
-
<h3 class="signature " id="validate-instance_method">
|
1398
|
-
|
1399
|
-
#<strong>validate</strong>(data, collector) ⇒ <tt>Object</tt>
|
1400
|
-
|
1401
|
-
|
1402
|
-
|
1403
|
-
|
1404
|
-
|
1405
|
-
</h3><table class="source_code">
|
1406
|
-
<tr>
|
1407
|
-
<td>
|
1408
|
-
<pre class="lines">
|
1409
|
-
|
1410
|
-
|
1411
|
-
115
|
1412
|
-
116
|
1413
|
-
117</pre>
|
1414
|
-
</td>
|
1415
|
-
<td>
|
1416
|
-
<pre class="code"><span class="info file"># File 'lib/schemacop/node.rb', line 115</span>
|
1417
|
-
|
1418
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_validate'>validate</span><span class='lparen'>(</span><span class='id identifier rubyid_data'>data</span><span class='comma'>,</span> <span class='id identifier rubyid_collector'>collector</span><span class='rparen'>)</span>
|
1419
|
-
<span class='id identifier rubyid_validate_custom_check'>validate_custom_check</span><span class='lparen'>(</span><span class='id identifier rubyid_data'>data</span><span class='comma'>,</span> <span class='id identifier rubyid_collector'>collector</span><span class='rparen'>)</span>
|
1420
|
-
<span class='kw'>end</span></pre>
|
1421
|
-
</td>
|
1422
|
-
</tr>
|
1423
|
-
</table>
|
1424
|
-
</div>
|
1425
|
-
|
1426
|
-
</div>
|
1427
|
-
|
1428
|
-
</div>
|
1429
|
-
|
1430
|
-
<div id="footer">
|
1431
|
-
Generated on Wed May 13 10:52:04 2020 by
|
1432
|
-
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
1433
|
-
0.9.20 (ruby-2.6.2).
|
1434
|
-
</div>
|
1435
|
-
|
1436
|
-
</div>
|
1437
|
-
</body>
|
1438
|
-
</html>
|