rconfig 0.4.2 → 0.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/ChangeLog +7 -0
- data/Gemfile +1 -0
- data/Gemfile.lock +2 -0
- data/Rakefile +11 -8
- data/doc/Array.html +184 -0
- data/doc/Hash.html +360 -0
- data/doc/NilClass.html +233 -0
- data/doc/RConfig.html +328 -0
- data/doc/RConfig/Callbacks.html +295 -0
- data/doc/RConfig/Cascade.html +316 -0
- data/doc/RConfig/Config.html +441 -0
- data/doc/RConfig/ConfigError.html +187 -0
- data/doc/RConfig/Constants.html +271 -0
- data/doc/RConfig/CoreMethods.html +814 -0
- data/doc/RConfig/DisabledLogger.html +424 -0
- data/doc/RConfig/Exceptions.html +266 -0
- data/doc/RConfig/Generators.html +186 -0
- data/doc/RConfig/Generators/InstallGenerator.html +233 -0
- data/doc/RConfig/InvalidLoadPathError.html +187 -0
- data/doc/RConfig/LoadPaths.html +375 -0
- data/doc/RConfig/Logger.html +184 -0
- data/doc/RConfig/PropertiesFile.html +399 -0
- data/doc/RConfig/Reload.html +481 -0
- data/doc/RConfig/Settings.html +188 -0
- data/doc/RConfig/Utils.html +841 -0
- data/doc/README_rdoc.html +331 -0
- data/doc/String.html +184 -0
- data/doc/created.rid +21 -1
- data/doc/index.html +423 -20
- data/doc/lib/generators/rconfig/install_generator_rb.html +52 -0
- data/doc/lib/generators/rconfig/templates/rconfig_rb.html +56 -0
- data/doc/lib/rconfig/callbacks_rb.html +52 -0
- data/doc/lib/rconfig/cascade_rb.html +52 -0
- data/doc/lib/rconfig/config_rb.html +61 -0
- data/doc/lib/rconfig/constants_rb.html +52 -0
- data/doc/lib/rconfig/core_ext/array_rb.html +52 -0
- data/doc/lib/rconfig/core_ext/hash_rb.html +61 -0
- data/doc/lib/rconfig/core_ext/nil_rb.html +52 -0
- data/doc/lib/rconfig/core_ext/string_rb.html +52 -0
- data/doc/lib/rconfig/core_methods_rb.html +55 -0
- data/doc/lib/rconfig/exceptions_rb.html +58 -0
- data/doc/lib/rconfig/load_paths_rb.html +52 -0
- data/doc/lib/rconfig/logger_rb.html +52 -0
- data/doc/lib/rconfig/properties_file_rb.html +93 -0
- data/doc/lib/rconfig/reload_rb.html +52 -0
- data/doc/lib/rconfig/settings_rb.html +52 -0
- data/doc/lib/rconfig/utils_rb.html +52 -0
- data/doc/lib/rconfig_rb.html +151 -0
- data/doc/rdoc.css +706 -0
- data/lib/rconfig.rb +1 -1
- data/lib/rconfig/load_paths.rb +2 -2
- data/lib/tasks/rdoc.rake +3 -4
- data/rconfig.gemspec +4 -2
- data/spec/config/erb_contents.yml +3 -0
- data/spec/config/props_config.conf +18 -0
- data/spec/config/spec.yml +17 -0
- data/spec/config/xml_config.xml +22 -0
- data/spec/config2/.gitkeep +0 -0
- data/spec/rconfig/load_paths_spec.rb +37 -0
- data/spec/rconfig/reload_spec.rb +37 -0
- data/spec/rconfig_spec.rb +61 -3
- data/spec/spec_helper.rb +12 -8
- metadata +82 -40
- data/doc/classes/ClassVariables.html +0 -111
- data/doc/classes/ConfigError.html +0 -120
- data/doc/classes/ConfigHash.html +0 -354
- data/doc/classes/Constants.html +0 -226
- data/doc/classes/Hash.html +0 -269
- data/doc/classes/InvalidConfigPathError.html +0 -119
- data/doc/classes/Object.html +0 -220
- data/doc/classes/PropertiesFileParser.html +0 -282
- data/doc/classes/RConfig.html +0 -1745
- data/doc/files/README_rdoc.html +0 -271
- data/doc/files/lib/rconfig/class_variables_rb.html +0 -107
- data/doc/files/lib/rconfig/config_hash_rb.html +0 -114
- data/doc/files/lib/rconfig/constants_rb.html +0 -101
- data/doc/files/lib/rconfig/core_ext/hash_rb.html +0 -114
- data/doc/files/lib/rconfig/core_ext/object_rb.html +0 -101
- data/doc/files/lib/rconfig/core_ext_rb.html +0 -114
- data/doc/files/lib/rconfig/exceptions_rb.html +0 -110
- data/doc/files/lib/rconfig/properties_file_parser_rb.html +0 -146
- data/doc/files/lib/rconfig/rconfig_rb.html +0 -186
- data/doc/files/lib/rconfig_rb.html +0 -117
- data/doc/fr_class_index.html +0 -35
- data/doc/fr_file_index.html +0 -37
- data/doc/fr_method_index.html +0 -75
- data/doc/rdoc-style.css +0 -208
- data/lib/tasks/gem.rake +0 -14
- data/lib/tasks/spec.rake +0 -25
- data/spec/core_ext/object_spec.rb +0 -44
|
@@ -0,0 +1,441 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
|
3
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
4
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
5
|
+
<head>
|
|
6
|
+
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
|
|
7
|
+
|
|
8
|
+
<title>Class: RConfig::Config</title>
|
|
9
|
+
|
|
10
|
+
<link rel="stylesheet" href="../rdoc.css" type="text/css" media="screen" />
|
|
11
|
+
|
|
12
|
+
<script src="../js/jquery.js" type="text/javascript"
|
|
13
|
+
charset="utf-8"></script>
|
|
14
|
+
<script src="../js/thickbox-compressed.js" type="text/javascript"
|
|
15
|
+
charset="utf-8"></script>
|
|
16
|
+
<script src="../js/quicksearch.js" type="text/javascript"
|
|
17
|
+
charset="utf-8"></script>
|
|
18
|
+
<script src="../js/darkfish.js" type="text/javascript"
|
|
19
|
+
charset="utf-8"></script>
|
|
20
|
+
|
|
21
|
+
</head>
|
|
22
|
+
<body class="class">
|
|
23
|
+
|
|
24
|
+
<div id="metadata">
|
|
25
|
+
<div id="home-metadata">
|
|
26
|
+
<div id="home-section" class="section">
|
|
27
|
+
<h3 class="section-header">
|
|
28
|
+
<a href="../index.html">Home</a>
|
|
29
|
+
<a href="../index.html#classes">Classes</a>
|
|
30
|
+
<a href="../index.html#methods">Methods</a>
|
|
31
|
+
</h3>
|
|
32
|
+
</div>
|
|
33
|
+
</div>
|
|
34
|
+
|
|
35
|
+
<div id="file-metadata">
|
|
36
|
+
<div id="file-list-section" class="section">
|
|
37
|
+
<h3 class="section-header">In Files</h3>
|
|
38
|
+
<div class="section-body">
|
|
39
|
+
<ul>
|
|
40
|
+
|
|
41
|
+
<li><a href="../lib/rconfig/config_rb.html?TB_iframe=true&height=550&width=785"
|
|
42
|
+
class="thickbox" title="lib/rconfig/config.rb">lib/rconfig/config.rb</a></li>
|
|
43
|
+
|
|
44
|
+
</ul>
|
|
45
|
+
</div>
|
|
46
|
+
</div>
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
</div>
|
|
50
|
+
|
|
51
|
+
<div id="class-metadata">
|
|
52
|
+
|
|
53
|
+
<!-- Parent Class -->
|
|
54
|
+
|
|
55
|
+
<div id="parent-class-section" class="section">
|
|
56
|
+
<h3 class="section-header">Parent</h3>
|
|
57
|
+
|
|
58
|
+
<p class="link">::HashWithIndifferentAccess</p>
|
|
59
|
+
|
|
60
|
+
</div>
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
<!-- Namespace Contents -->
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
<!-- Method Quickref -->
|
|
67
|
+
|
|
68
|
+
<div id="method-list-section" class="section">
|
|
69
|
+
<h3 class="section-header">Methods</h3>
|
|
70
|
+
<ul class="link-list">
|
|
71
|
+
|
|
72
|
+
<li><a href="#method-i-%5B%5D">#[]</a></li>
|
|
73
|
+
|
|
74
|
+
<li><a href="#method-i-convert_value">#convert_value</a></li>
|
|
75
|
+
|
|
76
|
+
<li><a href="#method-i-default">#default</a></li>
|
|
77
|
+
|
|
78
|
+
<li><a href="#method-i-method_missing">#method_missing</a></li>
|
|
79
|
+
|
|
80
|
+
<li><a href="#method-i-unknown">#unknown</a></li>
|
|
81
|
+
|
|
82
|
+
</ul>
|
|
83
|
+
</div>
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
<!-- Included Modules -->
|
|
87
|
+
|
|
88
|
+
</div>
|
|
89
|
+
|
|
90
|
+
<div id="project-metadata">
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
<div id="fileindex-section" class="section project-section">
|
|
94
|
+
<h3 class="section-header">Files</h3>
|
|
95
|
+
<ul>
|
|
96
|
+
|
|
97
|
+
<li class="file"><a href="../README_rdoc.html">README.rdoc</a></li>
|
|
98
|
+
|
|
99
|
+
</ul>
|
|
100
|
+
</div>
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
<div id="classindex-section" class="section project-section">
|
|
104
|
+
<h3 class="section-header">Class Index
|
|
105
|
+
<span class="search-toggle"><img src="../images/find.png"
|
|
106
|
+
height="16" width="16" alt="[+]"
|
|
107
|
+
title="show/hide quicksearch" /></span></h3>
|
|
108
|
+
<form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
|
|
109
|
+
<fieldset>
|
|
110
|
+
<legend>Quicksearch</legend>
|
|
111
|
+
<input type="text" name="quicksearch" value=""
|
|
112
|
+
class="quicksearch-field" />
|
|
113
|
+
</fieldset>
|
|
114
|
+
</form>
|
|
115
|
+
|
|
116
|
+
<ul class="link-list">
|
|
117
|
+
|
|
118
|
+
<li><a href="../RConfig.html">RConfig</a></li>
|
|
119
|
+
|
|
120
|
+
<li><a href="../RConfig/Callbacks.html">RConfig::Callbacks</a></li>
|
|
121
|
+
|
|
122
|
+
<li><a href="../RConfig/Cascade.html">RConfig::Cascade</a></li>
|
|
123
|
+
|
|
124
|
+
<li><a href="../RConfig/Config.html">RConfig::Config</a></li>
|
|
125
|
+
|
|
126
|
+
<li><a href="../RConfig/ConfigError.html">RConfig::ConfigError</a></li>
|
|
127
|
+
|
|
128
|
+
<li><a href="../RConfig/Constants.html">RConfig::Constants</a></li>
|
|
129
|
+
|
|
130
|
+
<li><a href="../RConfig/CoreMethods.html">RConfig::CoreMethods</a></li>
|
|
131
|
+
|
|
132
|
+
<li><a href="../RConfig/DisabledLogger.html">RConfig::DisabledLogger</a></li>
|
|
133
|
+
|
|
134
|
+
<li><a href="../RConfig/Exceptions.html">RConfig::Exceptions</a></li>
|
|
135
|
+
|
|
136
|
+
<li><a href="../RConfig/Generators.html">RConfig::Generators</a></li>
|
|
137
|
+
|
|
138
|
+
<li><a href="../RConfig/Generators/InstallGenerator.html">RConfig::Generators::InstallGenerator</a></li>
|
|
139
|
+
|
|
140
|
+
<li><a href="../RConfig/InvalidLoadPathError.html">RConfig::InvalidLoadPathError</a></li>
|
|
141
|
+
|
|
142
|
+
<li><a href="../RConfig/LoadPaths.html">RConfig::LoadPaths</a></li>
|
|
143
|
+
|
|
144
|
+
<li><a href="../RConfig/PropertiesFile.html">RConfig::PropertiesFile</a></li>
|
|
145
|
+
|
|
146
|
+
<li><a href="../RConfig/Reload.html">RConfig::Reload</a></li>
|
|
147
|
+
|
|
148
|
+
<li><a href="../RConfig/Settings.html">RConfig::Settings</a></li>
|
|
149
|
+
|
|
150
|
+
<li><a href="../RConfig/Utils.html">RConfig::Utils</a></li>
|
|
151
|
+
|
|
152
|
+
<li><a href="../Array.html">Array</a></li>
|
|
153
|
+
|
|
154
|
+
<li><a href="../Hash.html">Hash</a></li>
|
|
155
|
+
|
|
156
|
+
<li><a href="../NilClass.html">NilClass</a></li>
|
|
157
|
+
|
|
158
|
+
<li><a href="../String.html">String</a></li>
|
|
159
|
+
|
|
160
|
+
</ul>
|
|
161
|
+
<div id="no-class-search-results" style="display: none;">No matching classes.</div>
|
|
162
|
+
</div>
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
</div>
|
|
166
|
+
</div>
|
|
167
|
+
|
|
168
|
+
<div id="documentation">
|
|
169
|
+
<h1 class="class">RConfig::Config</h1>
|
|
170
|
+
|
|
171
|
+
<div id="description">
|
|
172
|
+
|
|
173
|
+
</div>
|
|
174
|
+
|
|
175
|
+
<!-- Constants -->
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
<!-- Attributes -->
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
<!-- Methods -->
|
|
182
|
+
|
|
183
|
+
<div id="public-instance-method-details" class="method-section section">
|
|
184
|
+
<h3 class="section-header">Public Instance Methods</h3>
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
<div id="--method" class="method-detail ">
|
|
188
|
+
<a name="method-i-%5B%5D"></a>
|
|
189
|
+
|
|
190
|
+
<div class="method-heading">
|
|
191
|
+
|
|
192
|
+
<span class="method-name">[]</span><span
|
|
193
|
+
class="method-args">(key)</span>
|
|
194
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
195
|
+
|
|
196
|
+
</div>
|
|
197
|
+
|
|
198
|
+
<div class="method-description">
|
|
199
|
+
|
|
200
|
+
<p>
|
|
201
|
+
Why the &*#^@*^&$ isn’t HashWithIndifferentAccess doing this?
|
|
202
|
+
HashWithIndifferentAccess doesn’t override Hash’s []!
|
|
203
|
+
That’s why it’s so destructive!
|
|
204
|
+
</p>
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
<div class="method-source-code"
|
|
209
|
+
id="--source">
|
|
210
|
+
<pre>
|
|
211
|
+
<span class="ruby-comment cmt"># File lib/rconfig/config.rb, line 60</span>
|
|
212
|
+
60: <span class="ruby-keyword kw">def</span> <span class="ruby-operator">[]</span>(<span class="ruby-identifier">key</span>)
|
|
213
|
+
61: <span class="ruby-identifier">key</span> = <span class="ruby-identifier">key</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">key</span>.<span class="ruby-identifier">kind_of?</span>(<span class="ruby-constant">Symbol</span>)
|
|
214
|
+
62: <span class="ruby-keyword kw">super</span>(<span class="ruby-identifier">key</span>)
|
|
215
|
+
63: <span class="ruby-keyword kw">end</span></pre>
|
|
216
|
+
</div>
|
|
217
|
+
|
|
218
|
+
</div>
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
</div>
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
<div id="default-method" class="method-detail ">
|
|
227
|
+
<a name="method-i-default"></a>
|
|
228
|
+
|
|
229
|
+
<div class="method-heading">
|
|
230
|
+
|
|
231
|
+
<span class="method-name">default</span><span
|
|
232
|
+
class="method-args">(key = self.default_key)</span>
|
|
233
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
234
|
+
|
|
235
|
+
</div>
|
|
236
|
+
|
|
237
|
+
<div class="method-description">
|
|
238
|
+
|
|
239
|
+
<p>
|
|
240
|
+
Allow hash.default => hash[‘default’] without breaking
|
|
241
|
+
Hash’s usage of default(key)
|
|
242
|
+
</p>
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
<div class="method-source-code"
|
|
247
|
+
id="default-source">
|
|
248
|
+
<pre>
|
|
249
|
+
<span class="ruby-comment cmt"># File lib/rconfig/config.rb, line 68</span>
|
|
250
|
+
68: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">default</span>(<span class="ruby-identifier">key</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">default_key</span>)
|
|
251
|
+
69: <span class="ruby-identifier">key</span> = <span class="ruby-identifier">key</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">key</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Symbol</span>)
|
|
252
|
+
70: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">key</span> <span class="ruby-operator">==</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">default_key</span>
|
|
253
|
+
71: <span class="ruby-keyword kw">self</span>[<span class="ruby-value str">'default'</span>] <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">key?</span>(<span class="ruby-value str">'default'</span>)
|
|
254
|
+
72: <span class="ruby-keyword kw">else</span>
|
|
255
|
+
73: <span class="ruby-identifier">hash_default</span>(<span class="ruby-identifier">key</span>)
|
|
256
|
+
74: <span class="ruby-keyword kw">end</span>
|
|
257
|
+
75: <span class="ruby-keyword kw">end</span></pre>
|
|
258
|
+
</div>
|
|
259
|
+
|
|
260
|
+
</div>
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
|
|
264
|
+
|
|
265
|
+
</div>
|
|
266
|
+
|
|
267
|
+
|
|
268
|
+
<div id="method-missing-method" class="method-detail ">
|
|
269
|
+
<a name="method-i-method_missing"></a>
|
|
270
|
+
|
|
271
|
+
<div class="method-heading">
|
|
272
|
+
|
|
273
|
+
<span class="method-name">method_missing</span><span
|
|
274
|
+
class="method-args">(method, *args)</span>
|
|
275
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
276
|
+
|
|
277
|
+
</div>
|
|
278
|
+
|
|
279
|
+
<div class="method-description">
|
|
280
|
+
|
|
281
|
+
<p>
|
|
282
|
+
Dotted notation can be used with arguments (useful for creating mock
|
|
283
|
+
objects) in the YAML file the method name is a key, argument(s) form a
|
|
284
|
+
nested key, so that the correct value is retrieved and returned.
|
|
285
|
+
</p>
|
|
286
|
+
<p>
|
|
287
|
+
For example loading to variable foo a yaml file that looks like: customer:
|
|
288
|
+
</p>
|
|
289
|
+
<pre>
|
|
290
|
+
id: 12345678
|
|
291
|
+
verified:
|
|
292
|
+
phone: verified
|
|
293
|
+
:address: info_not_available
|
|
294
|
+
? [name, employer]
|
|
295
|
+
: not_verified
|
|
296
|
+
</pre>
|
|
297
|
+
<p>
|
|
298
|
+
Allows the following calls: foo.customer.id => 12345678
|
|
299
|
+
foo.customer.verified.phone => verified
|
|
300
|
+
foo.customer.verified(“phone”) => verified
|
|
301
|
+
foo.customer.verified(:address) => info_not_available
|
|
302
|
+
foo.customer.verified(“name”, “employer”) =>
|
|
303
|
+
not_verified
|
|
304
|
+
</p>
|
|
305
|
+
<p>
|
|
306
|
+
Note that :address is specified as a symbol, where phone is just a string.
|
|
307
|
+
Depending on what kind of parameter the method being mocked out is going to
|
|
308
|
+
be called with, define in the YAML file either a string or a symbol. This
|
|
309
|
+
also works inside the composite array keys.
|
|
310
|
+
</p>
|
|
311
|
+
|
|
312
|
+
|
|
313
|
+
|
|
314
|
+
<div class="method-source-code"
|
|
315
|
+
id="method-missing-source">
|
|
316
|
+
<pre>
|
|
317
|
+
<span class="ruby-comment cmt"># File lib/rconfig/config.rb, line 42</span>
|
|
318
|
+
42: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">method_missing</span>(<span class="ruby-identifier">method</span>, *<span class="ruby-identifier">args</span>)
|
|
319
|
+
43: <span class="ruby-identifier">method</span> = <span class="ruby-identifier">method</span>.<span class="ruby-identifier">to_s</span>
|
|
320
|
+
44: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">method</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'default_key'</span>
|
|
321
|
+
45: <span class="ruby-identifier">value</span> = <span class="ruby-keyword kw">self</span>[<span class="ruby-identifier">method</span>]
|
|
322
|
+
46: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">args</span>.<span class="ruby-identifier">size</span>
|
|
323
|
+
47: <span class="ruby-keyword kw">when</span> <span class="ruby-value">0</span> <span class="ruby-comment cmt"># e.g.: RConfig.application.method</span>
|
|
324
|
+
48: <span class="ruby-identifier">value</span>
|
|
325
|
+
49: <span class="ruby-keyword kw">when</span> <span class="ruby-value">1</span> <span class="ruby-comment cmt"># e.g.: RConfig.application.method(one_arg)</span>
|
|
326
|
+
50: <span class="ruby-identifier">value</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">args</span>[<span class="ruby-value">0</span>])
|
|
327
|
+
51: <span class="ruby-keyword kw">else</span> <span class="ruby-comment cmt"># e.g.: RConfig.application.method(arg_one, args_two, ...)</span>
|
|
328
|
+
52: <span class="ruby-identifier">value</span>[<span class="ruby-identifier">args</span>]
|
|
329
|
+
53: <span class="ruby-keyword kw">end</span>
|
|
330
|
+
54: <span class="ruby-keyword kw">end</span></pre>
|
|
331
|
+
</div>
|
|
332
|
+
|
|
333
|
+
</div>
|
|
334
|
+
|
|
335
|
+
|
|
336
|
+
|
|
337
|
+
|
|
338
|
+
</div>
|
|
339
|
+
|
|
340
|
+
|
|
341
|
+
<div id="unknown-method" class="method-detail ">
|
|
342
|
+
<a name="method-i-unknown"></a>
|
|
343
|
+
|
|
344
|
+
<div class="method-heading">
|
|
345
|
+
|
|
346
|
+
<span class="method-name">unknown</span><span
|
|
347
|
+
class="method-args"></span>
|
|
348
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
349
|
+
|
|
350
|
+
</div>
|
|
351
|
+
|
|
352
|
+
<div class="method-description">
|
|
353
|
+
|
|
354
|
+
<p>
|
|
355
|
+
HashWithIndifferentAccess#default is broken in early versions of Rails.
|
|
356
|
+
This is defined to use the hash version in <a
|
|
357
|
+
href="Config.html#method-i-default">Config#default</a>
|
|
358
|
+
</p>
|
|
359
|
+
|
|
360
|
+
|
|
361
|
+
|
|
362
|
+
<div class="method-source-code"
|
|
363
|
+
id="unknown-source">
|
|
364
|
+
<pre>
|
|
365
|
+
<span class="ruby-comment cmt"># File lib/rconfig/config.rb, line 15</span>
|
|
366
|
+
15: <span class="ruby-identifier">define_method</span>(<span class="ruby-value">:hash_default</span>, <span class="ruby-constant">Hash</span>.<span class="ruby-identifier">instance_method</span>(<span class="ruby-value">:default</span>))
|
|
367
|
+
</pre>
|
|
368
|
+
</div>
|
|
369
|
+
|
|
370
|
+
</div>
|
|
371
|
+
|
|
372
|
+
|
|
373
|
+
|
|
374
|
+
|
|
375
|
+
</div>
|
|
376
|
+
|
|
377
|
+
|
|
378
|
+
</div>
|
|
379
|
+
|
|
380
|
+
<div id="protected-instance-method-details" class="method-section section">
|
|
381
|
+
<h3 class="section-header">Protected Instance Methods</h3>
|
|
382
|
+
|
|
383
|
+
|
|
384
|
+
<div id="convert-value-method" class="method-detail ">
|
|
385
|
+
<a name="method-i-convert_value"></a>
|
|
386
|
+
|
|
387
|
+
<div class="method-heading">
|
|
388
|
+
|
|
389
|
+
<span class="method-name">convert_value</span><span
|
|
390
|
+
class="method-args">(value)</span>
|
|
391
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
392
|
+
|
|
393
|
+
</div>
|
|
394
|
+
|
|
395
|
+
<div class="method-description">
|
|
396
|
+
|
|
397
|
+
<p>
|
|
398
|
+
Override HashWithIndifferentAccess#convert_value return instance of <a
|
|
399
|
+
href="Config.html">Config</a> for <a href="../Hash.html">Hash</a> values.
|
|
400
|
+
</p>
|
|
401
|
+
|
|
402
|
+
|
|
403
|
+
|
|
404
|
+
<div class="method-source-code"
|
|
405
|
+
id="convert-value-source">
|
|
406
|
+
<pre>
|
|
407
|
+
<span class="ruby-comment cmt"># File lib/rconfig/config.rb, line 82</span>
|
|
408
|
+
82: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">convert_value</span>(<span class="ruby-identifier">value</span>)
|
|
409
|
+
83: <span class="ruby-identifier">value</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Hash</span>) <span class="ruby-operator">?</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">value</span>).<span class="ruby-identifier">freeze</span> <span class="ruby-operator">:</span> <span class="ruby-keyword kw">super</span>
|
|
410
|
+
84: <span class="ruby-keyword kw">end</span></pre>
|
|
411
|
+
</div>
|
|
412
|
+
|
|
413
|
+
</div>
|
|
414
|
+
|
|
415
|
+
|
|
416
|
+
|
|
417
|
+
|
|
418
|
+
</div>
|
|
419
|
+
|
|
420
|
+
|
|
421
|
+
</div>
|
|
422
|
+
|
|
423
|
+
|
|
424
|
+
</div>
|
|
425
|
+
|
|
426
|
+
|
|
427
|
+
<div id="rdoc-debugging-section-dump" class="debugging-section">
|
|
428
|
+
|
|
429
|
+
<p>Disabled; run with --debug to generate this.</p>
|
|
430
|
+
|
|
431
|
+
</div>
|
|
432
|
+
|
|
433
|
+
<div id="validator-badges">
|
|
434
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
|
435
|
+
<p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
|
|
436
|
+
Rdoc Generator</a> 1.1.6</small>.</p>
|
|
437
|
+
</div>
|
|
438
|
+
|
|
439
|
+
</body>
|
|
440
|
+
</html>
|
|
441
|
+
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
|
3
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
4
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
5
|
+
<head>
|
|
6
|
+
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
|
|
7
|
+
|
|
8
|
+
<title>Class: RConfig::ConfigError</title>
|
|
9
|
+
|
|
10
|
+
<link rel="stylesheet" href="../rdoc.css" type="text/css" media="screen" />
|
|
11
|
+
|
|
12
|
+
<script src="../js/jquery.js" type="text/javascript"
|
|
13
|
+
charset="utf-8"></script>
|
|
14
|
+
<script src="../js/thickbox-compressed.js" type="text/javascript"
|
|
15
|
+
charset="utf-8"></script>
|
|
16
|
+
<script src="../js/quicksearch.js" type="text/javascript"
|
|
17
|
+
charset="utf-8"></script>
|
|
18
|
+
<script src="../js/darkfish.js" type="text/javascript"
|
|
19
|
+
charset="utf-8"></script>
|
|
20
|
+
|
|
21
|
+
</head>
|
|
22
|
+
<body class="class">
|
|
23
|
+
|
|
24
|
+
<div id="metadata">
|
|
25
|
+
<div id="home-metadata">
|
|
26
|
+
<div id="home-section" class="section">
|
|
27
|
+
<h3 class="section-header">
|
|
28
|
+
<a href="../index.html">Home</a>
|
|
29
|
+
<a href="../index.html#classes">Classes</a>
|
|
30
|
+
<a href="../index.html#methods">Methods</a>
|
|
31
|
+
</h3>
|
|
32
|
+
</div>
|
|
33
|
+
</div>
|
|
34
|
+
|
|
35
|
+
<div id="file-metadata">
|
|
36
|
+
<div id="file-list-section" class="section">
|
|
37
|
+
<h3 class="section-header">In Files</h3>
|
|
38
|
+
<div class="section-body">
|
|
39
|
+
<ul>
|
|
40
|
+
|
|
41
|
+
<li><a href="../lib/rconfig/exceptions_rb.html?TB_iframe=true&height=550&width=785"
|
|
42
|
+
class="thickbox" title="lib/rconfig/exceptions.rb">lib/rconfig/exceptions.rb</a></li>
|
|
43
|
+
|
|
44
|
+
</ul>
|
|
45
|
+
</div>
|
|
46
|
+
</div>
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
</div>
|
|
50
|
+
|
|
51
|
+
<div id="class-metadata">
|
|
52
|
+
|
|
53
|
+
<!-- Parent Class -->
|
|
54
|
+
|
|
55
|
+
<div id="parent-class-section" class="section">
|
|
56
|
+
<h3 class="section-header">Parent</h3>
|
|
57
|
+
|
|
58
|
+
<p class="link">StandardError</p>
|
|
59
|
+
|
|
60
|
+
</div>
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
<!-- Namespace Contents -->
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
<!-- Method Quickref -->
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
<!-- Included Modules -->
|
|
70
|
+
|
|
71
|
+
</div>
|
|
72
|
+
|
|
73
|
+
<div id="project-metadata">
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
<div id="fileindex-section" class="section project-section">
|
|
77
|
+
<h3 class="section-header">Files</h3>
|
|
78
|
+
<ul>
|
|
79
|
+
|
|
80
|
+
<li class="file"><a href="../README_rdoc.html">README.rdoc</a></li>
|
|
81
|
+
|
|
82
|
+
</ul>
|
|
83
|
+
</div>
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
<div id="classindex-section" class="section project-section">
|
|
87
|
+
<h3 class="section-header">Class Index
|
|
88
|
+
<span class="search-toggle"><img src="../images/find.png"
|
|
89
|
+
height="16" width="16" alt="[+]"
|
|
90
|
+
title="show/hide quicksearch" /></span></h3>
|
|
91
|
+
<form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
|
|
92
|
+
<fieldset>
|
|
93
|
+
<legend>Quicksearch</legend>
|
|
94
|
+
<input type="text" name="quicksearch" value=""
|
|
95
|
+
class="quicksearch-field" />
|
|
96
|
+
</fieldset>
|
|
97
|
+
</form>
|
|
98
|
+
|
|
99
|
+
<ul class="link-list">
|
|
100
|
+
|
|
101
|
+
<li><a href="../RConfig.html">RConfig</a></li>
|
|
102
|
+
|
|
103
|
+
<li><a href="../RConfig/Callbacks.html">RConfig::Callbacks</a></li>
|
|
104
|
+
|
|
105
|
+
<li><a href="../RConfig/Cascade.html">RConfig::Cascade</a></li>
|
|
106
|
+
|
|
107
|
+
<li><a href="../RConfig/Config.html">RConfig::Config</a></li>
|
|
108
|
+
|
|
109
|
+
<li><a href="../RConfig/ConfigError.html">RConfig::ConfigError</a></li>
|
|
110
|
+
|
|
111
|
+
<li><a href="../RConfig/Constants.html">RConfig::Constants</a></li>
|
|
112
|
+
|
|
113
|
+
<li><a href="../RConfig/CoreMethods.html">RConfig::CoreMethods</a></li>
|
|
114
|
+
|
|
115
|
+
<li><a href="../RConfig/DisabledLogger.html">RConfig::DisabledLogger</a></li>
|
|
116
|
+
|
|
117
|
+
<li><a href="../RConfig/Exceptions.html">RConfig::Exceptions</a></li>
|
|
118
|
+
|
|
119
|
+
<li><a href="../RConfig/Generators.html">RConfig::Generators</a></li>
|
|
120
|
+
|
|
121
|
+
<li><a href="../RConfig/Generators/InstallGenerator.html">RConfig::Generators::InstallGenerator</a></li>
|
|
122
|
+
|
|
123
|
+
<li><a href="../RConfig/InvalidLoadPathError.html">RConfig::InvalidLoadPathError</a></li>
|
|
124
|
+
|
|
125
|
+
<li><a href="../RConfig/LoadPaths.html">RConfig::LoadPaths</a></li>
|
|
126
|
+
|
|
127
|
+
<li><a href="../RConfig/PropertiesFile.html">RConfig::PropertiesFile</a></li>
|
|
128
|
+
|
|
129
|
+
<li><a href="../RConfig/Reload.html">RConfig::Reload</a></li>
|
|
130
|
+
|
|
131
|
+
<li><a href="../RConfig/Settings.html">RConfig::Settings</a></li>
|
|
132
|
+
|
|
133
|
+
<li><a href="../RConfig/Utils.html">RConfig::Utils</a></li>
|
|
134
|
+
|
|
135
|
+
<li><a href="../Array.html">Array</a></li>
|
|
136
|
+
|
|
137
|
+
<li><a href="../Hash.html">Hash</a></li>
|
|
138
|
+
|
|
139
|
+
<li><a href="../NilClass.html">NilClass</a></li>
|
|
140
|
+
|
|
141
|
+
<li><a href="../String.html">String</a></li>
|
|
142
|
+
|
|
143
|
+
</ul>
|
|
144
|
+
<div id="no-class-search-results" style="display: none;">No matching classes.</div>
|
|
145
|
+
</div>
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
</div>
|
|
149
|
+
</div>
|
|
150
|
+
|
|
151
|
+
<div id="documentation">
|
|
152
|
+
<h1 class="class">RConfig::ConfigError</h1>
|
|
153
|
+
|
|
154
|
+
<div id="description">
|
|
155
|
+
<p>
|
|
156
|
+
General error in config initialization or operation.
|
|
157
|
+
</p>
|
|
158
|
+
|
|
159
|
+
</div>
|
|
160
|
+
|
|
161
|
+
<!-- Constants -->
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
<!-- Attributes -->
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
<!-- Methods -->
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
</div>
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
<div id="rdoc-debugging-section-dump" class="debugging-section">
|
|
174
|
+
|
|
175
|
+
<p>Disabled; run with --debug to generate this.</p>
|
|
176
|
+
|
|
177
|
+
</div>
|
|
178
|
+
|
|
179
|
+
<div id="validator-badges">
|
|
180
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
|
181
|
+
<p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
|
|
182
|
+
Rdoc Generator</a> 1.1.6</small>.</p>
|
|
183
|
+
</div>
|
|
184
|
+
|
|
185
|
+
</body>
|
|
186
|
+
</html>
|
|
187
|
+
|