longleaf 0.1.0 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (185) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +94 -0
  3. data/.editorconfig +13 -0
  4. data/.gitignore +4 -1
  5. data/.rubocop.yml +44 -0
  6. data/.rubocop_todo.yml +834 -0
  7. data/.yardopts +1 -0
  8. data/Gemfile +16 -1
  9. data/README.md +98 -12
  10. data/Rakefile +6 -0
  11. data/bin/setup +16 -1
  12. data/docs/aboutlongleaf.md +28 -0
  13. data/docs/extra.css +32 -0
  14. data/docs/img/change-file.png +0 -0
  15. data/docs/img/ll-example-preserved.png +0 -0
  16. data/docs/index.md +19 -0
  17. data/docs/install.md +66 -0
  18. data/docs/ll-example/config-example-relative.yml +33 -0
  19. data/docs/ll-example/files-dir/LLexample-PDF.pdf +0 -0
  20. data/docs/ll-example/files-dir/LLexample-TOCHANGE.txt +15 -0
  21. data/docs/ll-example/files-dir/LLexample-tokeep.txt +10 -0
  22. data/docs/ll-example/metadata-dir/.gitkeep +0 -0
  23. data/docs/ll-example/replica-files/.gitkeep +0 -0
  24. data/docs/ll-example/replica-metadata/.gitkeep +0 -0
  25. data/docs/quickstart.md +270 -0
  26. data/docs/rdocs/Longleaf.html +135 -0
  27. data/docs/rdocs/Longleaf/AppFields.html +178 -0
  28. data/docs/rdocs/Longleaf/ApplicationConfigDeserializer.html +631 -0
  29. data/docs/rdocs/Longleaf/ApplicationConfigManager.html +610 -0
  30. data/docs/rdocs/Longleaf/ApplicationConfigValidator.html +238 -0
  31. data/docs/rdocs/Longleaf/CLI.html +909 -0
  32. data/docs/rdocs/Longleaf/ChecksumMismatchError.html +151 -0
  33. data/docs/rdocs/Longleaf/ConfigBuilder.html +1339 -0
  34. data/docs/rdocs/Longleaf/ConfigurationError.html +143 -0
  35. data/docs/rdocs/Longleaf/ConfigurationValidator.html +227 -0
  36. data/docs/rdocs/Longleaf/DeregisterCommand.html +420 -0
  37. data/docs/rdocs/Longleaf/DeregisterEvent.html +453 -0
  38. data/docs/rdocs/Longleaf/DeregistrationError.html +151 -0
  39. data/docs/rdocs/Longleaf/DigestHelper.html +419 -0
  40. data/docs/rdocs/Longleaf/EventError.html +147 -0
  41. data/docs/rdocs/Longleaf/EventNames.html +163 -0
  42. data/docs/rdocs/Longleaf/EventStatusTracking.html +656 -0
  43. data/docs/rdocs/Longleaf/FileCheckService.html +540 -0
  44. data/docs/rdocs/Longleaf/FileHelpers.html +520 -0
  45. data/docs/rdocs/Longleaf/FileRecord.html +716 -0
  46. data/docs/rdocs/Longleaf/FileSelector.html +901 -0
  47. data/docs/rdocs/Longleaf/FixityCheckService.html +691 -0
  48. data/docs/rdocs/Longleaf/IndexManager.html +1155 -0
  49. data/docs/rdocs/Longleaf/InvalidDigestAlgorithmError.html +143 -0
  50. data/docs/rdocs/Longleaf/InvalidStoragePathError.html +143 -0
  51. data/docs/rdocs/Longleaf/Logging.html +405 -0
  52. data/docs/rdocs/Longleaf/Logging/RedirectingLogger.html +1213 -0
  53. data/docs/rdocs/Longleaf/LongleafError.html +139 -0
  54. data/docs/rdocs/Longleaf/MDFields.html +193 -0
  55. data/docs/rdocs/Longleaf/MetadataBuilder.html +787 -0
  56. data/docs/rdocs/Longleaf/MetadataDeserializer.html +537 -0
  57. data/docs/rdocs/Longleaf/MetadataError.html +143 -0
  58. data/docs/rdocs/Longleaf/MetadataPersistenceManager.html +539 -0
  59. data/docs/rdocs/Longleaf/MetadataRecord.html +1411 -0
  60. data/docs/rdocs/Longleaf/MetadataSerializer.html +786 -0
  61. data/docs/rdocs/Longleaf/PreservationServiceError.html +147 -0
  62. data/docs/rdocs/Longleaf/PreserveCommand.html +410 -0
  63. data/docs/rdocs/Longleaf/PreserveEvent.html +491 -0
  64. data/docs/rdocs/Longleaf/RegisterCommand.html +428 -0
  65. data/docs/rdocs/Longleaf/RegisterEvent.html +628 -0
  66. data/docs/rdocs/Longleaf/RegisteredFileSelector.html +446 -0
  67. data/docs/rdocs/Longleaf/RegistrationError.html +151 -0
  68. data/docs/rdocs/Longleaf/ReindexCommand.html +576 -0
  69. data/docs/rdocs/Longleaf/RsyncReplicationService.html +1180 -0
  70. data/docs/rdocs/Longleaf/SequelIndexDriver.html +1978 -0
  71. data/docs/rdocs/Longleaf/ServiceCandidateFilesystemIterator.html +572 -0
  72. data/docs/rdocs/Longleaf/ServiceCandidateIndexIterator.html +532 -0
  73. data/docs/rdocs/Longleaf/ServiceCandidateLocator.html +333 -0
  74. data/docs/rdocs/Longleaf/ServiceClassCache.html +725 -0
  75. data/docs/rdocs/Longleaf/ServiceDateHelper.html +425 -0
  76. data/docs/rdocs/Longleaf/ServiceDefinition.html +683 -0
  77. data/docs/rdocs/Longleaf/ServiceDefinitionManager.html +371 -0
  78. data/docs/rdocs/Longleaf/ServiceDefinitionValidator.html +269 -0
  79. data/docs/rdocs/Longleaf/ServiceFields.html +173 -0
  80. data/docs/rdocs/Longleaf/ServiceManager.html +1229 -0
  81. data/docs/rdocs/Longleaf/ServiceMappingManager.html +410 -0
  82. data/docs/rdocs/Longleaf/ServiceMappingValidator.html +347 -0
  83. data/docs/rdocs/Longleaf/ServiceRecord.html +821 -0
  84. data/docs/rdocs/Longleaf/StorageLocation.html +985 -0
  85. data/docs/rdocs/Longleaf/StorageLocationManager.html +729 -0
  86. data/docs/rdocs/Longleaf/StorageLocationUnavailableError.html +143 -0
  87. data/docs/rdocs/Longleaf/StorageLocationValidator.html +373 -0
  88. data/docs/rdocs/Longleaf/StoragePathValidator.html +253 -0
  89. data/docs/rdocs/Longleaf/SystemConfigBuilder.html +441 -0
  90. data/docs/rdocs/Longleaf/SystemConfigFields.html +163 -0
  91. data/docs/rdocs/Longleaf/ValidateConfigCommand.html +451 -0
  92. data/docs/rdocs/Longleaf/ValidateMetadataCommand.html +408 -0
  93. data/docs/rdocs/_index.html +660 -0
  94. data/docs/rdocs/class_list.html +51 -0
  95. data/docs/rdocs/css/common.css +1 -0
  96. data/docs/rdocs/css/full_list.css +58 -0
  97. data/docs/rdocs/css/style.css +496 -0
  98. data/docs/rdocs/file.README.html +165 -0
  99. data/docs/rdocs/file_list.html +56 -0
  100. data/docs/rdocs/frames.html +17 -0
  101. data/docs/rdocs/index.html +165 -0
  102. data/docs/rdocs/js/app.js +303 -0
  103. data/docs/rdocs/js/full_list.js +216 -0
  104. data/docs/rdocs/js/jquery.js +4 -0
  105. data/docs/rdocs/method_list.html +2051 -0
  106. data/docs/rdocs/top-level-namespace.html +110 -0
  107. data/lib/longleaf/candidates/file_selector.rb +150 -0
  108. data/lib/longleaf/candidates/manifest_digest_provider.rb +17 -0
  109. data/lib/longleaf/candidates/physical_path_provider.rb +17 -0
  110. data/lib/longleaf/candidates/registered_file_selector.rb +67 -0
  111. data/lib/longleaf/candidates/service_candidate_filesystem_iterator.rb +93 -0
  112. data/lib/longleaf/candidates/service_candidate_index_iterator.rb +84 -0
  113. data/lib/longleaf/candidates/service_candidate_locator.rb +23 -0
  114. data/lib/longleaf/candidates/single_digest_provider.rb +13 -0
  115. data/lib/longleaf/cli.rb +252 -46
  116. data/lib/longleaf/commands/deregister_command.rb +51 -0
  117. data/lib/longleaf/commands/preserve_command.rb +50 -0
  118. data/lib/longleaf/commands/register_command.rb +34 -43
  119. data/lib/longleaf/commands/reindex_command.rb +92 -0
  120. data/lib/longleaf/commands/validate_config_command.rb +33 -8
  121. data/lib/longleaf/commands/validate_metadata_command.rb +51 -0
  122. data/lib/longleaf/errors.rb +26 -7
  123. data/lib/longleaf/events/deregister_event.rb +53 -0
  124. data/lib/longleaf/events/event_names.rb +9 -0
  125. data/lib/longleaf/events/event_status_tracking.rb +59 -0
  126. data/lib/longleaf/events/preserve_event.rb +82 -0
  127. data/lib/longleaf/events/register_event.rb +59 -51
  128. data/lib/longleaf/helpers/case_insensitive_hash.rb +38 -0
  129. data/lib/longleaf/helpers/digest_helper.rb +56 -0
  130. data/lib/longleaf/helpers/s3_uri_helper.rb +86 -0
  131. data/lib/longleaf/helpers/selection_options_parser.rb +215 -0
  132. data/lib/longleaf/helpers/service_date_helper.rb +78 -0
  133. data/lib/longleaf/indexing/index_manager.rb +101 -0
  134. data/lib/longleaf/indexing/sequel_index_driver.rb +306 -0
  135. data/lib/longleaf/logging.rb +5 -4
  136. data/lib/longleaf/logging/redirecting_logger.rb +30 -25
  137. data/lib/longleaf/models/app_fields.rb +7 -2
  138. data/lib/longleaf/models/file_record.rb +31 -8
  139. data/lib/longleaf/models/filesystem_metadata_location.rb +56 -0
  140. data/lib/longleaf/models/filesystem_storage_location.rb +52 -0
  141. data/lib/longleaf/models/md_fields.rb +3 -1
  142. data/lib/longleaf/models/metadata_location.rb +47 -0
  143. data/lib/longleaf/models/metadata_record.rb +43 -16
  144. data/lib/longleaf/models/s3_storage_location.rb +138 -0
  145. data/lib/longleaf/models/service_definition.rb +7 -6
  146. data/lib/longleaf/models/service_fields.rb +7 -1
  147. data/lib/longleaf/models/service_record.rb +10 -6
  148. data/lib/longleaf/models/storage_location.rb +24 -19
  149. data/lib/longleaf/models/storage_types.rb +9 -0
  150. data/lib/longleaf/models/system_config_fields.rb +9 -0
  151. data/lib/longleaf/preservation_services/file_check_service.rb +59 -0
  152. data/lib/longleaf/preservation_services/fixity_check_service.rb +124 -0
  153. data/lib/longleaf/preservation_services/rsync_replication_service.rb +198 -0
  154. data/lib/longleaf/preservation_services/s3_replication_service.rb +131 -0
  155. data/lib/longleaf/services/application_config_deserializer.rb +81 -24
  156. data/lib/longleaf/services/application_config_manager.rb +20 -6
  157. data/lib/longleaf/services/application_config_validator.rb +19 -9
  158. data/lib/longleaf/services/configuration_validator.rb +67 -4
  159. data/lib/longleaf/services/filesystem_location_validator.rb +16 -0
  160. data/lib/longleaf/services/metadata_deserializer.rb +115 -42
  161. data/lib/longleaf/services/metadata_persistence_manager.rb +47 -0
  162. data/lib/longleaf/services/metadata_serializer.rb +156 -23
  163. data/lib/longleaf/services/metadata_validator.rb +76 -0
  164. data/lib/longleaf/services/s3_location_validator.rb +19 -0
  165. data/lib/longleaf/services/service_class_cache.rb +112 -0
  166. data/lib/longleaf/services/service_definition_manager.rb +10 -7
  167. data/lib/longleaf/services/service_definition_validator.rb +25 -18
  168. data/lib/longleaf/services/service_manager.rb +86 -11
  169. data/lib/longleaf/services/service_mapping_manager.rb +13 -12
  170. data/lib/longleaf/services/service_mapping_validator.rb +36 -26
  171. data/lib/longleaf/services/storage_location_manager.rb +76 -15
  172. data/lib/longleaf/services/storage_location_validator.rb +49 -35
  173. data/lib/longleaf/specs/config_builder.rb +47 -23
  174. data/lib/longleaf/specs/config_validator_helpers.rb +16 -0
  175. data/lib/longleaf/specs/custom_matchers.rb +9 -0
  176. data/lib/longleaf/specs/file_helpers.rb +61 -0
  177. data/lib/longleaf/specs/metadata_builder.rb +98 -0
  178. data/lib/longleaf/specs/system_config_builder.rb +27 -0
  179. data/lib/longleaf/version.rb +1 -1
  180. data/longleaf.gemspec +20 -7
  181. data/mkdocs.yml +21 -0
  182. metadata +308 -24
  183. data/.travis.yml +0 -4
  184. data/lib/longleaf/commands/abstract_command.rb +0 -37
  185. data/lib/longleaf/services/storage_path_validator.rb +0 -16
@@ -0,0 +1,410 @@
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: Longleaf::ServiceMappingManager
8
+
9
+ &mdash; Documentation by YARD 0.9.19
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 = "Longleaf::ServiceMappingManager";
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="../Longleaf.html" title="Longleaf (module)">Longleaf</a></span></span>
41
+ &raquo;
42
+ <span class="title">ServiceMappingManager</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: Longleaf::ServiceMappingManager
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">Longleaf::ServiceMappingManager</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/longleaf/services/service_mapping_manager.rb</dd>
98
+ </dl>
99
+
100
+ </div>
101
+
102
+ <h2>Overview</h2><div class="docstring">
103
+ <div class="discussion">
104
+
105
+ <p>Manager which loads and provides access to location to service mappings</p>
106
+
107
+
108
+ </div>
109
+ </div>
110
+ <div class="tags">
111
+
112
+
113
+ </div>
114
+
115
+
116
+
117
+
118
+
119
+
120
+
121
+ <h2>
122
+ Instance Method Summary
123
+ <small><a href="#" class="summary_toggle">collapse</a></small>
124
+ </h2>
125
+
126
+ <ul class="summary">
127
+
128
+ <li class="public ">
129
+ <span class="summary_signature">
130
+
131
+ <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(config) &#x21d2; ServiceMappingManager </a>
132
+
133
+
134
+
135
+ </span>
136
+
137
+
138
+ <span class="note title constructor">constructor</span>
139
+
140
+
141
+
142
+
143
+
144
+
145
+
146
+
147
+ <span class="summary_desc"><div class='inline'>
148
+ <p>A new instance of ServiceMappingManager.</p>
149
+ </div></span>
150
+
151
+ </li>
152
+
153
+
154
+ <li class="public ">
155
+ <span class="summary_signature">
156
+
157
+ <a href="#list_services-instance_method" title="#list_services (instance method)">#<strong>list_services</strong>(loc_name) &#x21d2; Array </a>
158
+
159
+
160
+
161
+ </span>
162
+
163
+
164
+
165
+
166
+
167
+
168
+
169
+
170
+
171
+ <span class="summary_desc"><div class='inline'>
172
+ <p>Gets a list of service names associated with the given location.</p>
173
+ </div></span>
174
+
175
+ </li>
176
+
177
+
178
+ </ul>
179
+
180
+
181
+ <div id="constructor_details" class="method_details_list">
182
+ <h2>Constructor Details</h2>
183
+
184
+ <div class="method_details first">
185
+ <h3 class="signature first" id="initialize-instance_method">
186
+
187
+ #<strong>initialize</strong>(config) &#x21d2; <tt><span class='object_link'><a href="" title="Longleaf::ServiceMappingManager (class)">ServiceMappingManager</a></span></tt>
188
+
189
+
190
+
191
+
192
+
193
+ </h3><div class="docstring">
194
+ <div class="discussion">
195
+
196
+ <p>Returns a new instance of ServiceMappingManager</p>
197
+
198
+
199
+ </div>
200
+ </div>
201
+ <div class="tags">
202
+ <p class="tag_title">Parameters:</p>
203
+ <ul class="param">
204
+
205
+ <li>
206
+
207
+ <span class='name'>config</span>
208
+
209
+
210
+ <span class='type'>(<tt>Hash</tt>)</span>
211
+
212
+
213
+
214
+ &mdash;
215
+ <div class='inline'>
216
+ <p>has representation of the application configuration</p>
217
+ </div>
218
+
219
+ </li>
220
+
221
+ </ul>
222
+
223
+ <p class="tag_title">Raises:</p>
224
+ <ul class="raise">
225
+
226
+ <li>
227
+
228
+
229
+ <span class='type'>(<tt>ArgumentError</tt>)</span>
230
+
231
+
232
+
233
+ </li>
234
+
235
+ </ul>
236
+
237
+ </div><table class="source_code">
238
+ <tr>
239
+ <td>
240
+ <pre class="lines">
241
+
242
+
243
+ 10
244
+ 11
245
+ 12
246
+ 13
247
+ 14
248
+ 15
249
+ 16
250
+ 17
251
+ 18
252
+ 19
253
+ 20
254
+ 21
255
+ 22
256
+ 23
257
+ 24
258
+ 25
259
+ 26
260
+ 27
261
+ 28
262
+ 29
263
+ 30
264
+ 31
265
+ 32
266
+ 33
267
+ 34
268
+ 35
269
+ 36
270
+ 37
271
+ 38
272
+ 39</pre>
273
+ </td>
274
+ <td>
275
+ <pre class="code"><span class="info file"># File 'lib/longleaf/services/service_mapping_manager.rb', line 10</span>
276
+
277
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_config'>config</span><span class='rparen'>)</span>
278
+ <span class='id identifier rubyid_raise'>raise</span> <span class='const'>ArgumentError</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Configuration must be provided</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='op'>||</span> <span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
279
+
280
+ <span class='id identifier rubyid_mappings_config'>mappings_config</span> <span class='op'>=</span> <span class='id identifier rubyid_config'>config</span><span class='lbracket'>[</span><span class='const'>AF</span><span class='op'>::</span><span class='const'>SERVICE_MAPPINGS</span><span class='rbracket'>]</span>
281
+ <span class='id identifier rubyid_raise'>raise</span> <span class='const'>ArgumentError</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Service mappings configuration must be provided</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_mappings_config'>mappings_config</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
282
+
283
+ <span class='ivar'>@loc_to_services</span> <span class='op'>=</span> <span class='const'>Hash</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
284
+
285
+ <span class='id identifier rubyid_mappings_config'>mappings_config</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_mapping'>mapping</span><span class='op'>|</span>
286
+ <span class='id identifier rubyid_locations'>locations</span> <span class='op'>=</span> <span class='id identifier rubyid_mapping'>mapping</span><span class='lbracket'>[</span><span class='const'>AF</span><span class='op'>::</span><span class='const'>LOCATIONS</span><span class='rbracket'>]</span>
287
+ <span class='id identifier rubyid_services'>services</span> <span class='op'>=</span> <span class='id identifier rubyid_mapping'>mapping</span><span class='lbracket'>[</span><span class='const'>AF</span><span class='op'>::</span><span class='const'>SERVICES</span><span class='rbracket'>]</span>
288
+
289
+ <span class='id identifier rubyid_locations'>locations</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='id identifier rubyid_locations'>locations</span><span class='rbracket'>]</span> <span class='kw'>if</span> <span class='id identifier rubyid_locations'>locations</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>String</span><span class='rparen'>)</span>
290
+ <span class='id identifier rubyid_services'>services</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='id identifier rubyid_services'>services</span><span class='rbracket'>]</span> <span class='kw'>if</span> <span class='id identifier rubyid_services'>services</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>String</span><span class='rparen'>)</span>
291
+
292
+ <span class='id identifier rubyid_locations'>locations</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_loc_name'>loc_name</span><span class='op'>|</span>
293
+ <span class='ivar'>@loc_to_services</span><span class='lbracket'>[</span><span class='id identifier rubyid_loc_name'>loc_name</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='const'>Array</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span> <span class='kw'>unless</span> <span class='ivar'>@loc_to_services</span><span class='period'>.</span><span class='id identifier rubyid_key?'>key?</span><span class='lparen'>(</span><span class='id identifier rubyid_loc_name'>loc_name</span><span class='rparen'>)</span>
294
+
295
+ <span class='id identifier rubyid_service_set'>service_set</span> <span class='op'>=</span> <span class='ivar'>@loc_to_services</span><span class='lbracket'>[</span><span class='id identifier rubyid_loc_name'>loc_name</span><span class='rbracket'>]</span>
296
+ <span class='kw'>if</span> <span class='id identifier rubyid_services'>services</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>String</span><span class='rparen'>)</span>
297
+ <span class='id identifier rubyid_service_set'>service_set</span><span class='period'>.</span><span class='id identifier rubyid_push'>push</span><span class='lparen'>(</span><span class='id identifier rubyid_services'>services</span><span class='rparen'>)</span>
298
+ <span class='kw'>else</span>
299
+ <span class='id identifier rubyid_service_set'>service_set</span><span class='period'>.</span><span class='id identifier rubyid_concat'>concat</span><span class='lparen'>(</span><span class='id identifier rubyid_services'>services</span><span class='rparen'>)</span>
300
+ <span class='kw'>end</span>
301
+ <span class='kw'>end</span>
302
+ <span class='kw'>end</span>
303
+
304
+ <span class='ivar'>@loc_to_services</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_loc'>loc</span><span class='comma'>,</span> <span class='id identifier rubyid_services'>services</span><span class='op'>|</span> <span class='id identifier rubyid_services'>services</span><span class='period'>.</span><span class='id identifier rubyid_uniq!'>uniq!</span> <span class='rbrace'>}</span>
305
+ <span class='ivar'>@loc_to_services</span><span class='period'>.</span><span class='id identifier rubyid_freeze'>freeze</span>
306
+ <span class='kw'>end</span></pre>
307
+ </td>
308
+ </tr>
309
+ </table>
310
+ </div>
311
+
312
+ </div>
313
+
314
+
315
+ <div id="instance_method_details" class="method_details_list">
316
+ <h2>Instance Method Details</h2>
317
+
318
+
319
+ <div class="method_details first">
320
+ <h3 class="signature first" id="list_services-instance_method">
321
+
322
+ #<strong>list_services</strong>(loc_name) &#x21d2; <tt>Array</tt>
323
+
324
+
325
+
326
+
327
+
328
+ </h3><div class="docstring">
329
+ <div class="discussion">
330
+
331
+ <p>Gets a list of service names associated with the given location</p>
332
+
333
+
334
+ </div>
335
+ </div>
336
+ <div class="tags">
337
+ <p class="tag_title">Parameters:</p>
338
+ <ul class="param">
339
+
340
+ <li>
341
+
342
+ <span class='name'>loc_name</span>
343
+
344
+
345
+ <span class='type'>(<tt>String</tt>)</span>
346
+
347
+
348
+
349
+ &mdash;
350
+ <div class='inline'>
351
+ <p>name of the location to lookup</p>
352
+ </div>
353
+
354
+ </li>
355
+
356
+ </ul>
357
+
358
+ <p class="tag_title">Returns:</p>
359
+ <ul class="return">
360
+
361
+ <li>
362
+
363
+
364
+ <span class='type'>(<tt>Array</tt>)</span>
365
+
366
+
367
+
368
+ &mdash;
369
+ <div class='inline'>
370
+ <p>a list of service names associated with the location</p>
371
+ </div>
372
+
373
+ </li>
374
+
375
+ </ul>
376
+
377
+ </div><table class="source_code">
378
+ <tr>
379
+ <td>
380
+ <pre class="lines">
381
+
382
+
383
+ 44
384
+ 45
385
+ 46</pre>
386
+ </td>
387
+ <td>
388
+ <pre class="code"><span class="info file"># File 'lib/longleaf/services/service_mapping_manager.rb', line 44</span>
389
+
390
+ <span class='kw'>def</span> <span class='id identifier rubyid_list_services'>list_services</span><span class='lparen'>(</span><span class='id identifier rubyid_loc_name'>loc_name</span><span class='rparen'>)</span>
391
+ <span class='ivar'>@loc_to_services</span><span class='lbracket'>[</span><span class='id identifier rubyid_loc_name'>loc_name</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
392
+ <span class='kw'>end</span></pre>
393
+ </td>
394
+ </tr>
395
+ </table>
396
+ </div>
397
+
398
+ </div>
399
+
400
+ </div>
401
+
402
+ <div id="footer">
403
+ Generated on Tue May 28 15:48:02 2019 by
404
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
405
+ 0.9.19 (ruby-2.6.3).
406
+ </div>
407
+
408
+ </div>
409
+ </body>
410
+ </html>
@@ -0,0 +1,347 @@
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: Longleaf::ServiceMappingValidator
8
+
9
+ &mdash; Documentation by YARD 0.9.19
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 = "Longleaf::ServiceMappingValidator";
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="../Longleaf.html" title="Longleaf (module)">Longleaf</a></span></span>
41
+ &raquo;
42
+ <span class="title">ServiceMappingValidator</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: Longleaf::ServiceMappingValidator
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="ConfigurationValidator.html" title="Longleaf::ConfigurationValidator (class)">ConfigurationValidator</a></span></span>
73
+
74
+ <ul class="fullTree">
75
+ <li>Object</li>
76
+
77
+ <li class="next"><span class='object_link'><a href="ConfigurationValidator.html" title="Longleaf::ConfigurationValidator (class)">ConfigurationValidator</a></span></li>
78
+
79
+ <li class="next">Longleaf::ServiceMappingValidator</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/longleaf/services/service_mapping_validator.rb</dd>
100
+ </dl>
101
+
102
+ </div>
103
+
104
+ <h2>Overview</h2><div class="docstring">
105
+ <div class="discussion">
106
+
107
+ <p>Validates application configuration of service to location mappings</p>
108
+
109
+
110
+ </div>
111
+ </div>
112
+ <div class="tags">
113
+
114
+
115
+ </div>
116
+
117
+
118
+
119
+
120
+
121
+
122
+
123
+ <h2>
124
+ Class Method Summary
125
+ <small><a href="#" class="summary_toggle">collapse</a></small>
126
+ </h2>
127
+
128
+ <ul class="summary">
129
+
130
+ <li class="public ">
131
+ <span class="summary_signature">
132
+
133
+ <a href="#validate_config-class_method" title="validate_config (class method)">.<strong>validate_config</strong>(config) &#x21d2; Object </a>
134
+
135
+
136
+
137
+ </span>
138
+
139
+
140
+
141
+
142
+
143
+
144
+
145
+
146
+
147
+ <span class="summary_desc"><div class='inline'>
148
+ <p>Validates service mapping configuration to ensure that it is syntactically and referentially correct.</p>
149
+ </div></span>
150
+
151
+ </li>
152
+
153
+
154
+ <li class="private ">
155
+ <span class="summary_signature">
156
+
157
+ <a href="#validate_mapping_field-class_method" title="validate_mapping_field (class method)">.<strong>validate_mapping_field</strong>(field, mapping, valid_values) &#x21d2; Object </a>
158
+
159
+
160
+
161
+ </span>
162
+
163
+
164
+
165
+ <span class="note title private">private</span>
166
+
167
+
168
+
169
+
170
+
171
+ <span class="summary_desc"><div class='inline'></div></span>
172
+
173
+ </li>
174
+
175
+
176
+ </ul>
177
+
178
+
179
+
180
+
181
+
182
+
183
+
184
+
185
+
186
+
187
+
188
+ <h3 class="inherited">Methods inherited from <span class='object_link'><a href="ConfigurationValidator.html" title="Longleaf::ConfigurationValidator (class)">ConfigurationValidator</a></span></h3>
189
+ <p class="inherited"><span class='object_link'><a href="ConfigurationValidator.html#assert-class_method" title="Longleaf::ConfigurationValidator.assert (method)">assert</a></span></p>
190
+
191
+
192
+ <div id="class_method_details" class="method_details_list">
193
+ <h2>Class Method Details</h2>
194
+
195
+
196
+ <div class="method_details first">
197
+ <h3 class="signature first" id="validate_config-class_method">
198
+
199
+ .<strong>validate_config</strong>(config) &#x21d2; <tt>Object</tt>
200
+
201
+
202
+
203
+
204
+
205
+ </h3><div class="docstring">
206
+ <div class="discussion">
207
+
208
+ <p>Validates service mapping configuration to ensure that it is syntactically and referentially correct.</p>
209
+
210
+
211
+ </div>
212
+ </div>
213
+ <div class="tags">
214
+ <p class="tag_title">Parameters:</p>
215
+ <ul class="param">
216
+
217
+ <li>
218
+
219
+ <span class='name'>config</span>
220
+
221
+
222
+ <span class='type'>(<tt>Hash</tt>)</span>
223
+
224
+
225
+
226
+ &mdash;
227
+ <div class='inline'>
228
+ <p>hash containing the application configuration</p>
229
+ </div>
230
+
231
+ </li>
232
+
233
+ </ul>
234
+
235
+
236
+ </div><table class="source_code">
237
+ <tr>
238
+ <td>
239
+ <pre class="lines">
240
+
241
+
242
+ 14
243
+ 15
244
+ 16
245
+ 17
246
+ 18
247
+ 19
248
+ 20
249
+ 21
250
+ 22
251
+ 23
252
+ 24
253
+ 25
254
+ 26
255
+ 27
256
+ 28
257
+ 29
258
+ 30</pre>
259
+ </td>
260
+ <td>
261
+ <pre class="code"><span class="info file"># File 'lib/longleaf/services/service_mapping_validator.rb', line 14</span>
262
+
263
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_validate_config'>validate_config</span><span class='lparen'>(</span><span class='id identifier rubyid_config'>config</span><span class='rparen'>)</span>
264
+ <span class='id identifier rubyid_assert'>assert</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Configuration must be a hash, but a </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='embexpr_end'>}</span><span class='tstring_content'> was provided</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span> <span class='op'>==</span> <span class='const'>Hash</span><span class='rparen'>)</span>
265
+ <span class='id identifier rubyid_assert'>assert</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Configuration must contain a root &#39;</span><span class='embexpr_beg'>#{</span><span class='const'>AF</span><span class='op'>::</span><span class='const'>SERVICE_MAPPINGS</span><span class='embexpr_end'>}</span><span class='tstring_content'>&#39; key</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_key?'>key?</span><span class='lparen'>(</span><span class='const'>AF</span><span class='op'>::</span><span class='const'>SERVICE_MAPPINGS</span><span class='rparen'>)</span><span class='rparen'>)</span>
266
+ <span class='id identifier rubyid_mappings'>mappings</span> <span class='op'>=</span> <span class='id identifier rubyid_config'>config</span><span class='lbracket'>[</span><span class='const'>AF</span><span class='op'>::</span><span class='const'>SERVICE_MAPPINGS</span><span class='rbracket'>]</span>
267
+ <span class='kw'>return</span> <span class='kw'>if</span> <span class='id identifier rubyid_mappings'>mappings</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='op'>||</span> <span class='id identifier rubyid_mappings'>mappings</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
268
+ <span class='id identifier rubyid_assert'>assert</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>&#39;</span><span class='embexpr_beg'>#{</span><span class='const'>AF</span><span class='op'>::</span><span class='const'>SERVICE_MAPPINGS</span><span class='embexpr_end'>}</span><span class='tstring_content'>&#39; must be an array of mappings</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_mappings'>mappings</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Array</span><span class='rparen'>)</span><span class='rparen'>)</span>
269
+
270
+ <span class='id identifier rubyid_service_names'>service_names</span> <span class='op'>=</span> <span class='id identifier rubyid_config'>config</span><span class='lbracket'>[</span><span class='const'>AF</span><span class='op'>::</span><span class='const'>SERVICES</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_keys'>keys</span>
271
+ <span class='id identifier rubyid_location_names'>location_names</span> <span class='op'>=</span> <span class='id identifier rubyid_config'>config</span><span class='lbracket'>[</span><span class='const'>AF</span><span class='op'>::</span><span class='const'>LOCATIONS</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_keys'>keys</span>
272
+
273
+ <span class='id identifier rubyid_mappings'>mappings</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_mapping'>mapping</span><span class='op'>|</span>
274
+ <span class='id identifier rubyid_assert'>assert</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Mapping must be a hash, but received </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_mapping'>mapping</span><span class='period'>.</span><span class='id identifier rubyid_inspect'>inspect</span><span class='embexpr_end'>}</span><span class='tstring_content'> instead</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_mapping'>mapping</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Hash</span><span class='rparen'>)</span><span class='rparen'>)</span>
275
+
276
+ <span class='id identifier rubyid_validate_mapping_field'>validate_mapping_field</span><span class='lparen'>(</span><span class='const'>AF</span><span class='op'>::</span><span class='const'>LOCATIONS</span><span class='comma'>,</span> <span class='id identifier rubyid_mapping'>mapping</span><span class='comma'>,</span> <span class='id identifier rubyid_location_names'>location_names</span><span class='rparen'>)</span>
277
+ <span class='id identifier rubyid_validate_mapping_field'>validate_mapping_field</span><span class='lparen'>(</span><span class='const'>AF</span><span class='op'>::</span><span class='const'>SERVICES</span><span class='comma'>,</span> <span class='id identifier rubyid_mapping'>mapping</span><span class='comma'>,</span> <span class='id identifier rubyid_service_names'>service_names</span><span class='rparen'>)</span>
278
+ <span class='kw'>end</span>
279
+ <span class='kw'>end</span></pre>
280
+ </td>
281
+ </tr>
282
+ </table>
283
+ </div>
284
+
285
+ <div class="method_details ">
286
+ <h3 class="signature " id="validate_mapping_field-class_method">
287
+
288
+ .<strong>validate_mapping_field</strong>(field, mapping, valid_values) &#x21d2; <tt>Object</tt> <span class="extras">(private)</span>
289
+
290
+
291
+
292
+
293
+
294
+ </h3><table class="source_code">
295
+ <tr>
296
+ <td>
297
+ <pre class="lines">
298
+
299
+
300
+ 32
301
+ 33
302
+ 34
303
+ 35
304
+ 36
305
+ 37
306
+ 38
307
+ 39
308
+ 40
309
+ 41
310
+ 42
311
+ 43
312
+ 44</pre>
313
+ </td>
314
+ <td>
315
+ <pre class="code"><span class="info file"># File 'lib/longleaf/services/service_mapping_validator.rb', line 32</span>
316
+
317
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_validate_mapping_field'>validate_mapping_field</span><span class='lparen'>(</span><span class='id identifier rubyid_field'>field</span><span class='comma'>,</span> <span class='id identifier rubyid_mapping'>mapping</span><span class='comma'>,</span> <span class='id identifier rubyid_valid_values'>valid_values</span><span class='rparen'>)</span>
318
+ <span class='id identifier rubyid_assert'>assert</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Mapping must contain a &#39;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_field'>field</span><span class='embexpr_end'>}</span><span class='tstring_content'>&#39; field</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_mapping'>mapping</span><span class='period'>.</span><span class='id identifier rubyid_key?'>key?</span><span class='lparen'>(</span><span class='id identifier rubyid_field'>field</span><span class='rparen'>)</span><span class='rparen'>)</span>
319
+ <span class='id identifier rubyid_field_values'>field_values</span> <span class='op'>=</span> <span class='id identifier rubyid_mapping'>mapping</span><span class='lbracket'>[</span><span class='id identifier rubyid_field'>field</span><span class='rbracket'>]</span>
320
+ <span class='id identifier rubyid_assert'>assert</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Mapping &#39;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_field'>field</span><span class='embexpr_end'>}</span><span class='tstring_content'>&#39; field must be either a string or an array, but received &#39;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_field_values'>field_values</span><span class='period'>.</span><span class='id identifier rubyid_inspect'>inspect</span><span class='embexpr_end'>}</span><span class='tstring_content'>&#39; instead</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span>
321
+ <span class='id identifier rubyid_field_values'>field_values</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Array</span><span class='rparen'>)</span> <span class='op'>||</span> <span class='id identifier rubyid_field_values'>field_values</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>String</span><span class='rparen'>)</span><span class='rparen'>)</span>
322
+ <span class='id identifier rubyid_assert'>assert</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Mapping must specify one or more value in the &#39;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_field'>field</span><span class='embexpr_end'>}</span><span class='tstring_content'>&#39; field</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='op'>!</span><span class='id identifier rubyid_field_values'>field_values</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span><span class='rparen'>)</span>
323
+
324
+ <span class='id identifier rubyid_check_values'>check_values</span> <span class='op'>=</span> <span class='id identifier rubyid_field_values'>field_values</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>String</span><span class='rparen'>)</span> <span class='op'>?</span> <span class='lbracket'>[</span><span class='id identifier rubyid_field_values'>field_values</span><span class='rbracket'>]</span> <span class='op'>:</span> <span class='id identifier rubyid_field_values'>field_values</span>
325
+ <span class='id identifier rubyid_check_values'>check_values</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_value'>value</span><span class='op'>|</span>
326
+ <span class='id identifier rubyid_assert'>assert</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Mapping &#39;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_field'>field</span><span class='embexpr_end'>}</span><span class='tstring_content'>&#39; specifies value &#39;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_value'>value</span><span class='embexpr_end'>}</span><span class='tstring_content'>&#39;, but no </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_field'>field</span><span class='embexpr_end'>}</span><span class='tstring_content'> with that name exist</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span>
327
+ <span class='id identifier rubyid_valid_values'>valid_values</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span><span class='rparen'>)</span>
328
+ <span class='kw'>end</span>
329
+ <span class='kw'>end</span></pre>
330
+ </td>
331
+ </tr>
332
+ </table>
333
+ </div>
334
+
335
+ </div>
336
+
337
+ </div>
338
+
339
+ <div id="footer">
340
+ Generated on Tue May 28 15:48:02 2019 by
341
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
342
+ 0.9.19 (ruby-2.6.3).
343
+ </div>
344
+
345
+ </div>
346
+ </body>
347
+ </html>