schemacop 1.0.2 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (90) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +2 -1
  3. data/.rubocop.yml +59 -1
  4. data/CHANGELOG.md +10 -0
  5. data/README.md +389 -199
  6. data/Rakefile +2 -0
  7. data/VERSION +1 -1
  8. data/doc/Schemacop.html +41 -130
  9. data/doc/Schemacop/ArrayValidator.html +329 -0
  10. data/doc/Schemacop/BooleanValidator.html +145 -0
  11. data/doc/Schemacop/Collector.html +535 -0
  12. data/doc/Schemacop/Exceptions.html +39 -39
  13. data/doc/Schemacop/Exceptions/InvalidSchemaError.html +124 -0
  14. data/doc/Schemacop/Exceptions/ValidationError.html +124 -0
  15. data/doc/Schemacop/FieldNode.html +409 -0
  16. data/doc/Schemacop/FloatValidator.html +158 -0
  17. data/doc/Schemacop/HashValidator.html +263 -0
  18. data/doc/Schemacop/IntegerValidator.html +158 -0
  19. data/doc/Schemacop/NilValidator.html +145 -0
  20. data/doc/Schemacop/Node.html +1426 -0
  21. data/doc/Schemacop/NodeResolver.html +242 -0
  22. data/doc/Schemacop/NodeSupportingField.html +590 -0
  23. data/doc/Schemacop/NodeSupportingType.html +614 -0
  24. data/doc/Schemacop/NodeWithBlock.html +289 -0
  25. data/doc/Schemacop/NumberValidator.html +232 -0
  26. data/doc/Schemacop/ObjectValidator.html +288 -0
  27. data/doc/Schemacop/RootNode.html +171 -0
  28. data/doc/Schemacop/Schema.html +697 -0
  29. data/doc/Schemacop/StringValidator.html +295 -0
  30. data/doc/ScopedEnv.html +351 -0
  31. data/doc/_index.html +190 -47
  32. data/doc/class_list.html +24 -31
  33. data/doc/css/full_list.css +32 -31
  34. data/doc/css/style.css +244 -91
  35. data/doc/file.README.html +428 -232
  36. data/doc/file_list.html +26 -30
  37. data/doc/frames.html +7 -16
  38. data/doc/index.html +428 -232
  39. data/doc/inheritance.graphml +524 -0
  40. data/doc/inheritance.pdf +825 -0
  41. data/doc/js/app.js +106 -77
  42. data/doc/js/full_list.js +170 -135
  43. data/doc/method_list.html +494 -38
  44. data/doc/top-level-namespace.html +36 -36
  45. data/lib/schemacop.rb +22 -7
  46. data/lib/schemacop/collector.rb +34 -0
  47. data/lib/schemacop/exceptions.rb +2 -8
  48. data/lib/schemacop/field_node.rb +26 -0
  49. data/lib/schemacop/node.rb +127 -0
  50. data/lib/schemacop/node_resolver.rb +14 -0
  51. data/lib/schemacop/node_supporting_field.rb +62 -0
  52. data/lib/schemacop/node_supporting_type.rb +112 -0
  53. data/lib/schemacop/node_with_block.rb +16 -0
  54. data/lib/schemacop/root_node.rb +4 -0
  55. data/lib/schemacop/schema.rb +61 -0
  56. data/lib/schemacop/scoped_env.rb +18 -0
  57. data/lib/schemacop/validator/array_validator.rb +30 -0
  58. data/lib/schemacop/validator/boolean_validator.rb +5 -0
  59. data/lib/schemacop/validator/float_validator.rb +5 -0
  60. data/lib/schemacop/validator/hash_validator.rb +18 -0
  61. data/lib/schemacop/validator/integer_validator.rb +5 -0
  62. data/lib/schemacop/validator/nil_validator.rb +5 -0
  63. data/lib/schemacop/validator/number_validator.rb +19 -0
  64. data/lib/schemacop/validator/object_validator.rb +21 -0
  65. data/lib/schemacop/validator/string_validator.rb +37 -0
  66. data/schemacop.gemspec +7 -5
  67. data/test/custom_check_test.rb +86 -0
  68. data/test/custom_if_test.rb +95 -0
  69. data/test/nil_dis_allow_test.rb +41 -0
  70. data/test/short_forms_test.rb +316 -0
  71. data/test/test_helper.rb +6 -0
  72. data/test/types_test.rb +83 -0
  73. data/test/validator_array_test.rb +97 -0
  74. data/test/validator_boolean_test.rb +15 -0
  75. data/test/validator_float_test.rb +57 -0
  76. data/test/validator_hash_test.rb +71 -0
  77. data/test/validator_integer_test.rb +46 -0
  78. data/test/validator_nil_test.rb +13 -0
  79. data/test/validator_number_test.rb +60 -0
  80. data/test/validator_object_test.rb +87 -0
  81. data/test/validator_string_test.rb +76 -0
  82. metadata +78 -14
  83. data/doc/Schemacop/Exceptions/Base.html +0 -127
  84. data/doc/Schemacop/Exceptions/InvalidSchema.html +0 -141
  85. data/doc/Schemacop/Exceptions/Validation.html +0 -142
  86. data/doc/Schemacop/MethodValidation.html +0 -120
  87. data/doc/Schemacop/MethodValidation/ClassMethods.html +0 -196
  88. data/doc/Schemacop/Validator.html +0 -254
  89. data/lib/schemacop/validator.rb +0 -145
  90. data/test/schemacop_validator_test.rb +0 -257
@@ -0,0 +1,295 @@
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::StringValidator
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::StringValidator";
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">StringValidator</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::StringValidator
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::StringValidator</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/string_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
+ <h2>
118
+ Instance Method Summary
119
+ <small><a href="#" class="summary_toggle">collapse</a></small>
120
+ </h2>
121
+
122
+ <ul class="summary">
123
+
124
+ <li class="public ">
125
+ <span class="summary_signature">
126
+
127
+ <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(options = {}) &#x21d2; StringValidator </a>
128
+
129
+
130
+
131
+ </span>
132
+
133
+
134
+ <span class="note title constructor">constructor</span>
135
+
136
+
137
+
138
+
139
+
140
+
141
+
142
+
143
+ <span class="summary_desc"><div class='inline'><p>A new instance of StringValidator.</p>
144
+ </div></span>
145
+
146
+ </li>
147
+
148
+
149
+ <li class="public ">
150
+ <span class="summary_signature">
151
+
152
+ <a href="#validate-instance_method" title="#validate (instance method)">#<strong>validate</strong>(data, collector) &#x21d2; Object </a>
153
+
154
+
155
+
156
+ </span>
157
+
158
+
159
+
160
+
161
+
162
+
163
+
164
+
165
+
166
+ <span class="summary_desc"><div class='inline'></div></span>
167
+
168
+ </li>
169
+
170
+
171
+ </ul>
172
+
173
+
174
+
175
+
176
+
177
+
178
+
179
+
180
+
181
+
182
+
183
+ <h3 class="inherited">Methods inherited from <span class='object_link'><a href="Node.html" title="Schemacop::Node (class)">Node</a></span></h3>
184
+ <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#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></p>
185
+ <div id="constructor_details" class="method_details_list">
186
+ <h2>Constructor Details</h2>
187
+
188
+ <div class="method_details first">
189
+ <h3 class="signature first" id="initialize-instance_method">
190
+
191
+ #<strong>initialize</strong>(options = {}) &#x21d2; <tt><span class='object_link'><a href="" title="Schemacop::StringValidator (class)">StringValidator</a></span></tt>
192
+
193
+
194
+
195
+
196
+
197
+ </h3><div class="docstring">
198
+ <div class="discussion">
199
+ <p>Returns a new instance of StringValidator</p>
200
+
201
+
202
+ </div>
203
+ </div>
204
+ <div class="tags">
205
+
206
+
207
+ </div><table class="source_code">
208
+ <tr>
209
+ <td>
210
+ <pre class="lines">
211
+
212
+
213
+ 8
214
+ 9
215
+ 10
216
+ 11
217
+ 12</pre>
218
+ </td>
219
+ <td>
220
+ <pre class="code"><span class="info file"># File 'lib/schemacop/validator/string_validator.rb', line 8</span>
221
+
222
+ <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>
223
+ <span class='kw'>super</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
224
+
225
+ <span class='id identifier rubyid_validate_options!'>validate_options!</span>
226
+ <span class='kw'>end</span></pre>
227
+ </td>
228
+ </tr>
229
+ </table>
230
+ </div>
231
+
232
+ </div>
233
+
234
+
235
+ <div id="instance_method_details" class="method_details_list">
236
+ <h2>Instance Method Details</h2>
237
+
238
+
239
+ <div class="method_details first">
240
+ <h3 class="signature first" id="validate-instance_method">
241
+
242
+ #<strong>validate</strong>(data, collector) &#x21d2; <tt>Object</tt>
243
+
244
+
245
+
246
+
247
+
248
+ </h3><table class="source_code">
249
+ <tr>
250
+ <td>
251
+ <pre class="lines">
252
+
253
+
254
+ 14
255
+ 15
256
+ 16
257
+ 17
258
+ 18
259
+ 19
260
+ 20
261
+ 21
262
+ 22
263
+ 23</pre>
264
+ </td>
265
+ <td>
266
+ <pre class="code"><span class="info file"># File 'lib/schemacop/validator/string_validator.rb', line 14</span>
267
+
268
+ <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>
269
+ <span class='kw'>super</span>
270
+
271
+ <span class='kw'>if</span> <span class='id identifier rubyid_option?'>option?</span><span class='lparen'>(</span><span class='symbol'>:min</span><span class='rparen'>)</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_data'>data</span><span class='period'>.</span><span class='id identifier rubyid_size'>size</span> <span class='op'>&lt;</span> <span class='id identifier rubyid_option'>option</span><span class='lparen'>(</span><span class='symbol'>:min</span><span class='rparen'>)</span>
272
+ <span class='id identifier rubyid_collector'>collector</span><span class='period'>.</span><span class='id identifier rubyid_error'>error</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>String must be longer (&gt;=) than </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_option'>option</span><span class='lparen'>(</span><span class='symbol'>:min</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'> characters.</span><span class='tstring_end'>&quot;</span></span>
273
+ <span class='kw'>end</span>
274
+ <span class='kw'>if</span> <span class='id identifier rubyid_option?'>option?</span><span class='lparen'>(</span><span class='symbol'>:max</span><span class='rparen'>)</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_data'>data</span><span class='period'>.</span><span class='id identifier rubyid_size'>size</span> <span class='op'>&gt;</span> <span class='id identifier rubyid_option'>option</span><span class='lparen'>(</span><span class='symbol'>:max</span><span class='rparen'>)</span>
275
+ <span class='id identifier rubyid_collector'>collector</span><span class='period'>.</span><span class='id identifier rubyid_error'>error</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>String must be shorter (&lt;=) than </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_option'>option</span><span class='lparen'>(</span><span class='symbol'>:max</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'> characters.</span><span class='tstring_end'>&quot;</span></span>
276
+ <span class='kw'>end</span>
277
+ <span class='kw'>end</span></pre>
278
+ </td>
279
+ </tr>
280
+ </table>
281
+ </div>
282
+
283
+ </div>
284
+
285
+ </div>
286
+
287
+ <div id="footer">
288
+ Generated on Mon May 15 17:46:05 2017 by
289
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
290
+ 0.9.9 (ruby-2.3.1).
291
+ </div>
292
+
293
+ </div>
294
+ </body>
295
+ </html>
@@ -0,0 +1,351 @@
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: ScopedEnv
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 = "ScopedEnv";
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
+
41
+
42
+ <span class="title">ScopedEnv</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: ScopedEnv
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">ScopedEnv</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/scoped_env.rb</dd>
98
+ </dl>
99
+
100
+ </div>
101
+
102
+
103
+
104
+
105
+
106
+
107
+
108
+
109
+
110
+ <h2>
111
+ Instance Method Summary
112
+ <small><a href="#" class="summary_toggle">collapse</a></small>
113
+ </h2>
114
+
115
+ <ul class="summary">
116
+
117
+ <li class="public ">
118
+ <span class="summary_signature">
119
+
120
+ <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(delegation_object, methods) &#x21d2; ScopedEnv </a>
121
+
122
+
123
+
124
+ </span>
125
+
126
+
127
+ <span class="note title constructor">constructor</span>
128
+
129
+
130
+
131
+
132
+
133
+
134
+
135
+
136
+ <span class="summary_desc"><div class='inline'><p>A new instance of ScopedEnv.</p>
137
+ </div></span>
138
+
139
+ </li>
140
+
141
+
142
+ <li class="public ">
143
+ <span class="summary_signature">
144
+
145
+ <a href="#method_missing-instance_method" title="#method_missing (instance method)">#<strong>method_missing</strong>(symbol, *args, &amp;block) &#x21d2; Object </a>
146
+
147
+
148
+
149
+ </span>
150
+
151
+
152
+
153
+
154
+
155
+
156
+
157
+
158
+
159
+ <span class="summary_desc"><div class='inline'></div></span>
160
+
161
+ </li>
162
+
163
+
164
+ <li class="public ">
165
+ <span class="summary_signature">
166
+
167
+ <a href="#respond_to_missing%3F-instance_method" title="#respond_to_missing? (instance method)">#<strong>respond_to_missing?</strong>(symbol, include_private = false) &#x21d2; Boolean </a>
168
+
169
+
170
+
171
+ </span>
172
+
173
+
174
+
175
+
176
+
177
+
178
+
179
+
180
+
181
+ <span class="summary_desc"><div class='inline'></div></span>
182
+
183
+ </li>
184
+
185
+
186
+ </ul>
187
+
188
+
189
+ <div id="constructor_details" class="method_details_list">
190
+ <h2>Constructor Details</h2>
191
+
192
+ <div class="method_details first">
193
+ <h3 class="signature first" id="initialize-instance_method">
194
+
195
+ #<strong>initialize</strong>(delegation_object, methods) &#x21d2; <tt><span class='object_link'><a href="" title="ScopedEnv (class)">ScopedEnv</a></span></tt>
196
+
197
+
198
+
199
+
200
+
201
+ </h3><div class="docstring">
202
+ <div class="discussion">
203
+ <p>Returns a new instance of ScopedEnv</p>
204
+
205
+
206
+ </div>
207
+ </div>
208
+ <div class="tags">
209
+
210
+
211
+ </div><table class="source_code">
212
+ <tr>
213
+ <td>
214
+ <pre class="lines">
215
+
216
+
217
+ 2
218
+ 3
219
+ 4
220
+ 5</pre>
221
+ </td>
222
+ <td>
223
+ <pre class="code"><span class="info file"># File 'lib/schemacop/scoped_env.rb', line 2</span>
224
+
225
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_delegation_object'>delegation_object</span><span class='comma'>,</span> <span class='id identifier rubyid_methods'>methods</span><span class='rparen'>)</span>
226
+ <span class='ivar'>@delegation_object</span> <span class='op'>=</span> <span class='id identifier rubyid_delegation_object'>delegation_object</span>
227
+ <span class='ivar'>@methods</span> <span class='op'>=</span> <span class='id identifier rubyid_methods'>methods</span>
228
+ <span class='kw'>end</span></pre>
229
+ </td>
230
+ </tr>
231
+ </table>
232
+ </div>
233
+
234
+ </div>
235
+ <div id="method_missing_details" class="method_details_list">
236
+ <h2>Dynamic Method Handling</h2>
237
+ <p class="notice this">
238
+ This class handles dynamic methods through the <tt>method_missing</tt> method
239
+
240
+ </p>
241
+
242
+ <div class="method_details first">
243
+ <h3 class="signature first" id="method_missing-instance_method">
244
+
245
+ #<strong>method_missing</strong>(symbol, *args, &amp;block) &#x21d2; <tt>Object</tt>
246
+
247
+
248
+
249
+
250
+
251
+ </h3><table class="source_code">
252
+ <tr>
253
+ <td>
254
+ <pre class="lines">
255
+
256
+
257
+ 7
258
+ 8
259
+ 9
260
+ 10
261
+ 11
262
+ 12
263
+ 13</pre>
264
+ </td>
265
+ <td>
266
+ <pre class="code"><span class="info file"># File 'lib/schemacop/scoped_env.rb', line 7</span>
267
+
268
+ <span class='kw'>def</span> <span class='id identifier rubyid_method_missing'>method_missing</span><span class='lparen'>(</span><span class='id identifier rubyid_symbol'>symbol</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
269
+ <span class='kw'>if</span> <span class='ivar'>@methods</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='id identifier rubyid_symbol'>symbol</span><span class='rparen'>)</span>
270
+ <span class='ivar'>@delegation_object</span><span class='period'>.</span><span class='id identifier rubyid_send'>send</span><span class='lparen'>(</span><span class='id identifier rubyid_symbol'>symbol</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
271
+ <span class='kw'>else</span>
272
+ <span class='kw'>super</span>
273
+ <span class='kw'>end</span>
274
+ <span class='kw'>end</span></pre>
275
+ </td>
276
+ </tr>
277
+ </table>
278
+ </div>
279
+
280
+ </div>
281
+
282
+
283
+ <div id="instance_method_details" class="method_details_list">
284
+ <h2>Instance Method Details</h2>
285
+
286
+
287
+ <div class="method_details first">
288
+ <h3 class="signature first" id="respond_to_missing?-instance_method">
289
+
290
+ #<strong>respond_to_missing?</strong>(symbol, include_private = false) &#x21d2; <tt>Boolean</tt>
291
+
292
+
293
+
294
+
295
+
296
+ </h3><div class="docstring">
297
+ <div class="discussion">
298
+
299
+
300
+ </div>
301
+ </div>
302
+ <div class="tags">
303
+
304
+ <p class="tag_title">Returns:</p>
305
+ <ul class="return">
306
+
307
+ <li>
308
+
309
+
310
+ <span class='type'>(<tt>Boolean</tt>)</span>
311
+
312
+
313
+
314
+ </li>
315
+
316
+ </ul>
317
+
318
+ </div><table class="source_code">
319
+ <tr>
320
+ <td>
321
+ <pre class="lines">
322
+
323
+
324
+ 15
325
+ 16
326
+ 17</pre>
327
+ </td>
328
+ <td>
329
+ <pre class="code"><span class="info file"># File 'lib/schemacop/scoped_env.rb', line 15</span>
330
+
331
+ <span class='kw'>def</span> <span class='id identifier rubyid_respond_to_missing?'>respond_to_missing?</span><span class='lparen'>(</span><span class='id identifier rubyid_symbol'>symbol</span><span class='comma'>,</span> <span class='id identifier rubyid_include_private'>include_private</span> <span class='op'>=</span> <span class='kw'>false</span><span class='rparen'>)</span>
332
+ <span class='ivar'>@methods</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='id identifier rubyid_symbol'>symbol</span><span class='rparen'>)</span> <span class='op'>||</span> <span class='kw'>super</span>
333
+ <span class='kw'>end</span></pre>
334
+ </td>
335
+ </tr>
336
+ </table>
337
+ </div>
338
+
339
+ </div>
340
+
341
+ </div>
342
+
343
+ <div id="footer">
344
+ Generated on Mon May 15 17:46:05 2017 by
345
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
346
+ 0.9.9 (ruby-2.3.1).
347
+ </div>
348
+
349
+ </div>
350
+ </body>
351
+ </html>