rbatch 1.13.1 → 2.0.0
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 +15 -0
- data/README.ja.md +81 -49
- data/README.md +88 -63
- data/Rakefile +2 -31
- data/bin/rbatch-init +57 -32
- data/{rdocs → doc}/RBatch/Cmd.html +66 -59
- data/{rdocs → doc}/RBatch/CmdException.html +9 -3
- data/{rdocs → doc}/RBatch/CmdResult.html +40 -34
- data/{rdocs → doc}/RBatch/CommonConfig/Exception.html +9 -3
- data/{rdocs → doc}/RBatch/CommonConfig.html +22 -17
- data/{rdocs → doc}/RBatch/Config/Exception.html +9 -3
- data/{rdocs → doc}/RBatch/Config.html +21 -16
- data/{rdocs/RBatchException.html → doc/RBatch/DoubleRunCheckException.html} +33 -30
- data/doc/RBatch/DoubleRunChecker.html +277 -0
- data/{rdocs → doc}/RBatch/Log.html +134 -138
- data/doc/RBatch/RunConf/Exception.html +159 -0
- data/doc/RBatch/RunConf.html +557 -0
- data/doc/RBatch.html +655 -0
- data/doc/created.rid +9 -0
- data/{rdocs → doc}/index.html +46 -20
- data/{rdocs → doc}/lib/rbatch/cmd_rb.html +4 -2
- data/{rdocs → doc}/lib/rbatch/common_config_rb.html +2 -2
- data/{rdocs → doc}/lib/rbatch/config_rb.html +2 -2
- data/doc/lib/rbatch/double_run_checker_rb.html +56 -0
- data/{rdocs → doc}/lib/rbatch/log_rb.html +2 -2
- data/doc/lib/rbatch/run_conf_rb.html +56 -0
- data/{rdocs → doc}/lib/rbatch/version_rb.html +2 -2
- data/{rdocs → doc}/lib/rbatch_rb.html +7 -3
- data/lib/rbatch/cmd.rb +20 -23
- data/lib/rbatch/common_config.rb +2 -3
- data/lib/rbatch/config.rb +1 -2
- data/lib/rbatch/double_run_checker.rb +24 -0
- data/lib/rbatch/log.rb +37 -59
- data/lib/rbatch/run_conf.rb +109 -0
- data/lib/rbatch/version.rb +1 -1
- data/lib/rbatch.rb +37 -56
- data/spec/{cmd_test.spec → cmd_spec.rb} +6 -6
- data/spec/common_config_spec.rb +54 -0
- data/spec/{config_test.spec → config_spec.rb} +2 -1
- data/spec/double_run_checker_spec.rb +10 -0
- data/spec/{log_test.spec → log_spec.rb} +22 -22
- data/spec/rbatch_spec.rb +24 -0
- data/spec/run_conf_spec.rb +85 -0
- metadata +66 -65
- data/rdocs/RBatch.html +0 -713
- data/rdocs/created.rid +0 -7
- data/spec/rbatch_test.spec +0 -25
- data/test/cases/test_cmd.rb +0 -134
- data/test/cases/test_common_config.rb +0 -41
- data/test/cases/test_config.rb +0 -41
- data/test/cases/test_log.rb +0 -613
- data/test/mocks/PrintArgs.exe +0 -0
- data/test/mocks/win_cmd.exe +0 -0
- /data/{rdocs → doc}/images/brick.png +0 -0
- /data/{rdocs → doc}/images/brick_link.png +0 -0
- /data/{rdocs → doc}/images/bug.png +0 -0
- /data/{rdocs → doc}/images/bullet_black.png +0 -0
- /data/{rdocs → doc}/images/bullet_toggle_minus.png +0 -0
- /data/{rdocs → doc}/images/bullet_toggle_plus.png +0 -0
- /data/{rdocs → doc}/images/date.png +0 -0
- /data/{rdocs → doc}/images/find.png +0 -0
- /data/{rdocs → doc}/images/loadingAnimation.gif +0 -0
- /data/{rdocs → doc}/images/macFFBgHack.png +0 -0
- /data/{rdocs → doc}/images/package.png +0 -0
- /data/{rdocs → doc}/images/page_green.png +0 -0
- /data/{rdocs → doc}/images/page_white_text.png +0 -0
- /data/{rdocs → doc}/images/page_white_width.png +0 -0
- /data/{rdocs → doc}/images/plugin.png +0 -0
- /data/{rdocs → doc}/images/ruby.png +0 -0
- /data/{rdocs → doc}/images/tag_green.png +0 -0
- /data/{rdocs → doc}/images/wrench.png +0 -0
- /data/{rdocs → doc}/images/wrench_orange.png +0 -0
- /data/{rdocs → doc}/images/zoom.png +0 -0
- /data/{rdocs → doc}/js/darkfish.js +0 -0
- /data/{rdocs → doc}/js/jquery.js +0 -0
- /data/{rdocs → doc}/js/quicksearch.js +0 -0
- /data/{rdocs → doc}/js/thickbox-compressed.js +0 -0
- /data/{rdocs → doc}/rdoc.css +0 -0
@@ -0,0 +1,557 @@
|
|
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: RBatch::RunConf</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/rbatch/run_conf_rb.html?TB_iframe=true&height=550&width=785"
|
42
|
+
class="thickbox" title="lib/rbatch/run_conf.rb">lib/rbatch/run_conf.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">Object</p>
|
59
|
+
|
60
|
+
</div>
|
61
|
+
|
62
|
+
|
63
|
+
<!-- Namespace Contents -->
|
64
|
+
|
65
|
+
<div id="namespace-list-section" class="section">
|
66
|
+
<h3 class="section-header">Namespace</h3>
|
67
|
+
<ul class="link-list">
|
68
|
+
|
69
|
+
<li><span class="type">CLASS</span> <a href="RunConf/Exception.html">RBatch::RunConf::Exception</a></li>
|
70
|
+
|
71
|
+
</ul>
|
72
|
+
</div>
|
73
|
+
|
74
|
+
|
75
|
+
<!-- Method Quickref -->
|
76
|
+
|
77
|
+
<div id="method-list-section" class="section">
|
78
|
+
<h3 class="section-header">Methods</h3>
|
79
|
+
<ul class="link-list">
|
80
|
+
|
81
|
+
<li><a href="#method-c-new">::new</a></li>
|
82
|
+
|
83
|
+
<li><a href="#method-i-%5B%5D">#[]</a></li>
|
84
|
+
|
85
|
+
<li><a href="#method-i-%5B%5D%3D">#[]=</a></li>
|
86
|
+
|
87
|
+
<li><a href="#method-i-load">#load</a></li>
|
88
|
+
|
89
|
+
<li><a href="#method-i-merge">#merge</a></li>
|
90
|
+
|
91
|
+
<li><a href="#method-i-merge%21">#merge!</a></li>
|
92
|
+
|
93
|
+
<li><a href="#method-i-reload">#reload</a></li>
|
94
|
+
|
95
|
+
<li><a href="#method-i-reset">#reset</a></li>
|
96
|
+
|
97
|
+
</ul>
|
98
|
+
</div>
|
99
|
+
|
100
|
+
|
101
|
+
<!-- Included Modules -->
|
102
|
+
|
103
|
+
</div>
|
104
|
+
|
105
|
+
<div id="project-metadata">
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
<div id="classindex-section" class="section project-section">
|
110
|
+
<h3 class="section-header">Class Index
|
111
|
+
<span class="search-toggle"><img src="../images/find.png"
|
112
|
+
height="16" width="16" alt="[+]"
|
113
|
+
title="show/hide quicksearch" /></span></h3>
|
114
|
+
<form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
|
115
|
+
<fieldset>
|
116
|
+
<legend>Quicksearch</legend>
|
117
|
+
<input type="text" name="quicksearch" value=""
|
118
|
+
class="quicksearch-field" />
|
119
|
+
</fieldset>
|
120
|
+
</form>
|
121
|
+
|
122
|
+
<ul class="link-list">
|
123
|
+
|
124
|
+
<li><a href="../RBatch.html">RBatch</a></li>
|
125
|
+
|
126
|
+
<li><a href="../RBatch/Cmd.html">RBatch::Cmd</a></li>
|
127
|
+
|
128
|
+
<li><a href="../RBatch/CmdException.html">RBatch::CmdException</a></li>
|
129
|
+
|
130
|
+
<li><a href="../RBatch/CmdResult.html">RBatch::CmdResult</a></li>
|
131
|
+
|
132
|
+
<li><a href="../RBatch/CommonConfig.html">RBatch::CommonConfig</a></li>
|
133
|
+
|
134
|
+
<li><a href="../RBatch/CommonConfig/Exception.html">RBatch::CommonConfig::Exception</a></li>
|
135
|
+
|
136
|
+
<li><a href="../RBatch/Config.html">RBatch::Config</a></li>
|
137
|
+
|
138
|
+
<li><a href="../RBatch/Config/Exception.html">RBatch::Config::Exception</a></li>
|
139
|
+
|
140
|
+
<li><a href="../RBatch/DoubleRunCheckException.html">RBatch::DoubleRunCheckException</a></li>
|
141
|
+
|
142
|
+
<li><a href="../RBatch/DoubleRunChecker.html">RBatch::DoubleRunChecker</a></li>
|
143
|
+
|
144
|
+
<li><a href="../RBatch/Log.html">RBatch::Log</a></li>
|
145
|
+
|
146
|
+
<li><a href="../RBatch/RunConf.html">RBatch::RunConf</a></li>
|
147
|
+
|
148
|
+
<li><a href="../RBatch/RunConf/Exception.html">RBatch::RunConf::Exception</a></li>
|
149
|
+
|
150
|
+
</ul>
|
151
|
+
<div id="no-class-search-results" style="display: none;">No matching classes.</div>
|
152
|
+
</div>
|
153
|
+
|
154
|
+
|
155
|
+
</div>
|
156
|
+
</div>
|
157
|
+
|
158
|
+
<div id="documentation">
|
159
|
+
<h1 class="class">RBatch::RunConf</h1>
|
160
|
+
|
161
|
+
<div id="description">
|
162
|
+
|
163
|
+
</div>
|
164
|
+
|
165
|
+
<!-- Constants -->
|
166
|
+
|
167
|
+
|
168
|
+
<!-- Attributes -->
|
169
|
+
|
170
|
+
<div id="attribute-method-details" class="method-section section">
|
171
|
+
<h3 class="section-header">Attributes</h3>
|
172
|
+
|
173
|
+
|
174
|
+
<div id="run-conf-path-attribute-method" class="method-detail">
|
175
|
+
<a name="run_conf_path"></a>
|
176
|
+
|
177
|
+
<div class="method-heading attribute-method-heading">
|
178
|
+
<span class="method-name">run_conf_path</span><span
|
179
|
+
class="attribute-access-type">[R]</span>
|
180
|
+
</div>
|
181
|
+
|
182
|
+
<div class="method-description">
|
183
|
+
|
184
|
+
|
185
|
+
|
186
|
+
</div>
|
187
|
+
</div>
|
188
|
+
|
189
|
+
<div id="home-dir-attribute-method" class="method-detail">
|
190
|
+
<a name="home_dir"></a>
|
191
|
+
|
192
|
+
<div class="method-heading attribute-method-heading">
|
193
|
+
<span class="method-name">home_dir</span><span
|
194
|
+
class="attribute-access-type">[R]</span>
|
195
|
+
</div>
|
196
|
+
|
197
|
+
<div class="method-description">
|
198
|
+
|
199
|
+
|
200
|
+
|
201
|
+
</div>
|
202
|
+
</div>
|
203
|
+
|
204
|
+
</div>
|
205
|
+
|
206
|
+
|
207
|
+
<!-- Methods -->
|
208
|
+
|
209
|
+
<div id="public-class-method-details" class="method-section section">
|
210
|
+
<h3 class="section-header">Public Class Methods</h3>
|
211
|
+
|
212
|
+
|
213
|
+
<div id="new-method" class="method-detail ">
|
214
|
+
<a name="method-c-new"></a>
|
215
|
+
|
216
|
+
<div class="method-heading">
|
217
|
+
|
218
|
+
<span class="method-name">new</span><span
|
219
|
+
class="method-args">(run_conf_path,home_dir)</span>
|
220
|
+
<span class="method-click-advice">click to toggle source</span>
|
221
|
+
|
222
|
+
</div>
|
223
|
+
|
224
|
+
<div class="method-description">
|
225
|
+
|
226
|
+
|
227
|
+
|
228
|
+
|
229
|
+
|
230
|
+
<div class="method-source-code"
|
231
|
+
id="new-source">
|
232
|
+
<pre>
|
233
|
+
<span class="ruby-comment cmt"># File lib/rbatch/run_conf.rb, line 28</span>
|
234
|
+
28: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">run_conf_path</span>,<span class="ruby-identifier">home_dir</span>)
|
235
|
+
29: <span class="ruby-ivar">@run_conf_path</span> = <span class="ruby-identifier">run_conf_path</span>
|
236
|
+
30: <span class="ruby-ivar">@home_dir</span> = <span class="ruby-identifier">home_dir</span>
|
237
|
+
31: <span class="ruby-identifier">reset</span>
|
238
|
+
32: <span class="ruby-identifier">load</span>
|
239
|
+
33: <span class="ruby-keyword kw">end</span></pre>
|
240
|
+
</div>
|
241
|
+
|
242
|
+
</div>
|
243
|
+
|
244
|
+
|
245
|
+
|
246
|
+
|
247
|
+
</div>
|
248
|
+
|
249
|
+
|
250
|
+
</div>
|
251
|
+
|
252
|
+
<div id="public-instance-method-details" class="method-section section">
|
253
|
+
<h3 class="section-header">Public Instance Methods</h3>
|
254
|
+
|
255
|
+
|
256
|
+
<div id="--method" class="method-detail ">
|
257
|
+
<a name="method-i-%5B%5D"></a>
|
258
|
+
|
259
|
+
<div class="method-heading">
|
260
|
+
|
261
|
+
<span class="method-name">[]</span><span
|
262
|
+
class="method-args">(key)</span>
|
263
|
+
<span class="method-click-advice">click to toggle source</span>
|
264
|
+
|
265
|
+
</div>
|
266
|
+
|
267
|
+
<div class="method-description">
|
268
|
+
|
269
|
+
|
270
|
+
|
271
|
+
|
272
|
+
|
273
|
+
<div class="method-source-code"
|
274
|
+
id="--source">
|
275
|
+
<pre>
|
276
|
+
<span class="ruby-comment cmt"># File lib/rbatch/run_conf.rb, line 92</span>
|
277
|
+
92: <span class="ruby-keyword kw">def</span><span class="ruby-operator">[]</span>(<span class="ruby-identifier">key</span>)
|
278
|
+
93: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@opt</span>[<span class="ruby-identifier">key</span>].<span class="ruby-identifier">nil?</span>
|
279
|
+
94: <span class="ruby-identifier">raise</span> <span class="ruby-constant">RBatch</span><span class="ruby-operator">::</span><span class="ruby-constant">RunConf</span><span class="ruby-operator">::</span><span class="ruby-constant">Exception</span>, <span class="ruby-node">"Value of key=\"#{key}\" is nil"</span>
|
280
|
+
95: <span class="ruby-keyword kw">end</span>
|
281
|
+
96: <span class="ruby-ivar">@opt</span>[<span class="ruby-identifier">key</span>]
|
282
|
+
97: <span class="ruby-keyword kw">end</span></pre>
|
283
|
+
</div>
|
284
|
+
|
285
|
+
</div>
|
286
|
+
|
287
|
+
|
288
|
+
|
289
|
+
|
290
|
+
</div>
|
291
|
+
|
292
|
+
|
293
|
+
<div id="--method" class="method-detail ">
|
294
|
+
<a name="method-i-%5B%5D%3D"></a>
|
295
|
+
|
296
|
+
<div class="method-heading">
|
297
|
+
|
298
|
+
<span class="method-name">[]=</span><span
|
299
|
+
class="method-args">(key,value)</span>
|
300
|
+
<span class="method-click-advice">click to toggle source</span>
|
301
|
+
|
302
|
+
</div>
|
303
|
+
|
304
|
+
<div class="method-description">
|
305
|
+
|
306
|
+
|
307
|
+
|
308
|
+
|
309
|
+
|
310
|
+
<div class="method-source-code"
|
311
|
+
id="--source">
|
312
|
+
<pre>
|
313
|
+
<span class="ruby-comment cmt"># File lib/rbatch/run_conf.rb, line 99</span>
|
314
|
+
99: <span class="ruby-keyword kw">def</span><span class="ruby-operator">[]=</span>(<span class="ruby-identifier">key</span>,<span class="ruby-identifier">value</span>)
|
315
|
+
100: <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span> <span class="ruby-ivar">@opt</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">key</span>)
|
316
|
+
101: <span class="ruby-identifier">raise</span> <span class="ruby-constant">RBatch</span><span class="ruby-operator">::</span><span class="ruby-constant">RunConf</span><span class="ruby-operator">::</span><span class="ruby-constant">Exception</span>, <span class="ruby-node">"Key=\"#{key}\" does not exist"</span>
|
317
|
+
102: <span class="ruby-keyword kw">end</span>
|
318
|
+
103: <span class="ruby-ivar">@opt</span>[<span class="ruby-identifier">key</span>]=<span class="ruby-identifier">value</span>
|
319
|
+
104: <span class="ruby-keyword kw">end</span></pre>
|
320
|
+
</div>
|
321
|
+
|
322
|
+
</div>
|
323
|
+
|
324
|
+
|
325
|
+
|
326
|
+
|
327
|
+
</div>
|
328
|
+
|
329
|
+
|
330
|
+
<div id="load-method" class="method-detail ">
|
331
|
+
<a name="method-i-load"></a>
|
332
|
+
|
333
|
+
<div class="method-heading">
|
334
|
+
|
335
|
+
<span class="method-name">load</span><span
|
336
|
+
class="method-args">()</span>
|
337
|
+
<span class="method-click-advice">click to toggle source</span>
|
338
|
+
|
339
|
+
</div>
|
340
|
+
|
341
|
+
<div class="method-description">
|
342
|
+
|
343
|
+
|
344
|
+
|
345
|
+
|
346
|
+
|
347
|
+
<div class="method-source-code"
|
348
|
+
id="load-source">
|
349
|
+
<pre>
|
350
|
+
<span class="ruby-comment cmt"># File lib/rbatch/run_conf.rb, line 47</span>
|
351
|
+
47: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">load</span>()
|
352
|
+
48: <span class="ruby-keyword kw">begin</span>
|
353
|
+
49: <span class="ruby-ivar">@yaml</span> = <span class="ruby-constant">YAML</span><span class="ruby-operator">::</span><span class="ruby-identifier">load_file</span>(<span class="ruby-ivar">@run_conf_path</span>)
|
354
|
+
50: <span class="ruby-keyword kw">rescue</span>
|
355
|
+
51: <span class="ruby-comment cmt"># when run_conf does not exist, do nothing.</span>
|
356
|
+
52: <span class="ruby-ivar">@yaml</span> = <span class="ruby-keyword kw">false</span>
|
357
|
+
53: <span class="ruby-keyword kw">end</span>
|
358
|
+
54: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@yaml</span>
|
359
|
+
55: <span class="ruby-ivar">@yaml</span>.<span class="ruby-identifier">each_key</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">key</span><span class="ruby-operator">|</span>
|
360
|
+
56: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">@@def_opt</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">key</span>.<span class="ruby-identifier">to_sym</span>)
|
361
|
+
57: <span class="ruby-ivar">@opt</span>[<span class="ruby-identifier">key</span>.<span class="ruby-identifier">to_sym</span>]=<span class="ruby-ivar">@yaml</span>[<span class="ruby-identifier">key</span>]
|
362
|
+
58: <span class="ruby-keyword kw">else</span>
|
363
|
+
59: <span class="ruby-identifier">raise</span> <span class="ruby-constant">RBatch</span><span class="ruby-operator">::</span><span class="ruby-constant">RunConf</span><span class="ruby-operator">::</span><span class="ruby-constant">Exception</span>, <span class="ruby-node">"\"#{key}\" is not available option"</span>
|
364
|
+
60: <span class="ruby-keyword kw">end</span>
|
365
|
+
61: <span class="ruby-keyword kw">end</span>
|
366
|
+
62: <span class="ruby-keyword kw">end</span>
|
367
|
+
63: <span class="ruby-keyword kw">end</span></pre>
|
368
|
+
</div>
|
369
|
+
|
370
|
+
</div>
|
371
|
+
|
372
|
+
|
373
|
+
|
374
|
+
|
375
|
+
</div>
|
376
|
+
|
377
|
+
|
378
|
+
<div id="merge-method" class="method-detail ">
|
379
|
+
<a name="method-i-merge"></a>
|
380
|
+
|
381
|
+
<div class="method-heading">
|
382
|
+
|
383
|
+
<span class="method-name">merge</span><span
|
384
|
+
class="method-args">(opt)</span>
|
385
|
+
<span class="method-click-advice">click to toggle source</span>
|
386
|
+
|
387
|
+
</div>
|
388
|
+
|
389
|
+
<div class="method-description">
|
390
|
+
|
391
|
+
|
392
|
+
|
393
|
+
|
394
|
+
|
395
|
+
<div class="method-source-code"
|
396
|
+
id="merge-source">
|
397
|
+
<pre>
|
398
|
+
<span class="ruby-comment cmt"># File lib/rbatch/run_conf.rb, line 80</span>
|
399
|
+
80: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">merge</span>(<span class="ruby-identifier">opt</span>)
|
400
|
+
81: <span class="ruby-identifier">tmp</span> = <span class="ruby-ivar">@opt</span>.<span class="ruby-identifier">clone</span>
|
401
|
+
82: <span class="ruby-identifier">opt</span>.<span class="ruby-identifier">each_key</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">key</span><span class="ruby-operator">|</span>
|
402
|
+
83: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">tmp</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">key</span>)
|
403
|
+
84: <span class="ruby-identifier">tmp</span>[<span class="ruby-identifier">key</span>] = <span class="ruby-identifier">opt</span>[<span class="ruby-identifier">key</span>]
|
404
|
+
85: <span class="ruby-keyword kw">else</span>
|
405
|
+
86: <span class="ruby-identifier">raise</span> <span class="ruby-constant">RBatch</span><span class="ruby-operator">::</span><span class="ruby-constant">RunConf</span><span class="ruby-operator">::</span><span class="ruby-constant">Exception</span>, <span class="ruby-node">"\"#{key}\" is not available option"</span>
|
406
|
+
87: <span class="ruby-keyword kw">end</span>
|
407
|
+
88: <span class="ruby-keyword kw">end</span>
|
408
|
+
89: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">tmp</span>
|
409
|
+
90: <span class="ruby-keyword kw">end</span></pre>
|
410
|
+
</div>
|
411
|
+
|
412
|
+
</div>
|
413
|
+
|
414
|
+
|
415
|
+
|
416
|
+
|
417
|
+
</div>
|
418
|
+
|
419
|
+
|
420
|
+
<div id="merge--method" class="method-detail ">
|
421
|
+
<a name="method-i-merge%21"></a>
|
422
|
+
|
423
|
+
<div class="method-heading">
|
424
|
+
|
425
|
+
<span class="method-name">merge!</span><span
|
426
|
+
class="method-args">(opt)</span>
|
427
|
+
<span class="method-click-advice">click to toggle source</span>
|
428
|
+
|
429
|
+
</div>
|
430
|
+
|
431
|
+
<div class="method-description">
|
432
|
+
|
433
|
+
|
434
|
+
|
435
|
+
|
436
|
+
|
437
|
+
<div class="method-source-code"
|
438
|
+
id="merge--source">
|
439
|
+
<pre>
|
440
|
+
<span class="ruby-comment cmt"># File lib/rbatch/run_conf.rb, line 70</span>
|
441
|
+
70: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">merge!</span>(<span class="ruby-identifier">opt</span>)
|
442
|
+
71: <span class="ruby-identifier">opt</span>.<span class="ruby-identifier">each_key</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">key</span><span class="ruby-operator">|</span>
|
443
|
+
72: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@opt</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">key</span>)
|
444
|
+
73: <span class="ruby-ivar">@opt</span>[<span class="ruby-identifier">key</span>] = <span class="ruby-identifier">opt</span>[<span class="ruby-identifier">key</span>]
|
445
|
+
74: <span class="ruby-keyword kw">else</span>
|
446
|
+
75: <span class="ruby-identifier">raise</span> <span class="ruby-constant">RBatch</span><span class="ruby-operator">::</span><span class="ruby-constant">RunConf</span><span class="ruby-operator">::</span><span class="ruby-constant">Exception</span>, <span class="ruby-node">"\"#{key}\" is not available option"</span>
|
447
|
+
76: <span class="ruby-keyword kw">end</span>
|
448
|
+
77: <span class="ruby-keyword kw">end</span>
|
449
|
+
78: <span class="ruby-keyword kw">end</span></pre>
|
450
|
+
</div>
|
451
|
+
|
452
|
+
</div>
|
453
|
+
|
454
|
+
|
455
|
+
|
456
|
+
|
457
|
+
</div>
|
458
|
+
|
459
|
+
|
460
|
+
<div id="reload-method" class="method-detail ">
|
461
|
+
<a name="method-i-reload"></a>
|
462
|
+
|
463
|
+
<div class="method-heading">
|
464
|
+
|
465
|
+
<span class="method-name">reload</span><span
|
466
|
+
class="method-args">()</span>
|
467
|
+
<span class="method-click-advice">click to toggle source</span>
|
468
|
+
|
469
|
+
</div>
|
470
|
+
|
471
|
+
<div class="method-description">
|
472
|
+
|
473
|
+
|
474
|
+
|
475
|
+
|
476
|
+
|
477
|
+
<div class="method-source-code"
|
478
|
+
id="reload-source">
|
479
|
+
<pre>
|
480
|
+
<span class="ruby-comment cmt"># File lib/rbatch/run_conf.rb, line 65</span>
|
481
|
+
65: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">reload</span>()
|
482
|
+
66: <span class="ruby-identifier">reset</span>
|
483
|
+
67: <span class="ruby-identifier">load</span>
|
484
|
+
68: <span class="ruby-keyword kw">end</span></pre>
|
485
|
+
</div>
|
486
|
+
|
487
|
+
</div>
|
488
|
+
|
489
|
+
|
490
|
+
|
491
|
+
|
492
|
+
</div>
|
493
|
+
|
494
|
+
|
495
|
+
<div id="reset-method" class="method-detail ">
|
496
|
+
<a name="method-i-reset"></a>
|
497
|
+
|
498
|
+
<div class="method-heading">
|
499
|
+
|
500
|
+
<span class="method-name">reset</span><span
|
501
|
+
class="method-args">()</span>
|
502
|
+
<span class="method-click-advice">click to toggle source</span>
|
503
|
+
|
504
|
+
</div>
|
505
|
+
|
506
|
+
<div class="method-description">
|
507
|
+
|
508
|
+
|
509
|
+
|
510
|
+
|
511
|
+
|
512
|
+
<div class="method-source-code"
|
513
|
+
id="reset-source">
|
514
|
+
<pre>
|
515
|
+
<span class="ruby-comment cmt"># File lib/rbatch/run_conf.rb, line 35</span>
|
516
|
+
35: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">reset</span>()
|
517
|
+
36: <span class="ruby-ivar">@opt</span> = <span class="ruby-identifier">@@def_opt</span>.<span class="ruby-identifier">clone</span>
|
518
|
+
37: <span class="ruby-keyword kw">case</span> <span class="ruby-constant">RUBY_PLATFORM</span>
|
519
|
+
38: <span class="ruby-keyword kw">when</span> <span class="ruby-regexp re">/mswin|mingw/</span>
|
520
|
+
39: <span class="ruby-ivar">@opt</span>[<span class="ruby-value">:log_hostname</span>] = <span class="ruby-constant">ENV</span>[<span class="ruby-value str">"COMPUTERNAME"</span>] <span class="ruby-operator">?</span> <span class="ruby-constant">ENV</span>[<span class="ruby-value str">"COMPUTERNAME"</span>] <span class="ruby-operator">:</span> <span class="ruby-value str">"unknownhost"</span>
|
521
|
+
40: <span class="ruby-keyword kw">when</span> <span class="ruby-regexp re">/cygwin|linux/</span>
|
522
|
+
41: <span class="ruby-ivar">@opt</span>[<span class="ruby-value">:log_hostname</span>] = <span class="ruby-constant">ENV</span>[<span class="ruby-value str">"HOSTNAME"</span>] <span class="ruby-operator">?</span> <span class="ruby-constant">ENV</span>[<span class="ruby-value str">"HOSTNAME"</span>] <span class="ruby-operator">:</span> <span class="ruby-value str">"unknownhost"</span>
|
523
|
+
42: <span class="ruby-keyword kw">else</span>
|
524
|
+
43: <span class="ruby-ivar">@opt</span>[<span class="ruby-value">:log_hostname</span>] = <span class="ruby-value str">"unknownhost"</span>
|
525
|
+
44: <span class="ruby-keyword kw">end</span>
|
526
|
+
45: <span class="ruby-keyword kw">end</span></pre>
|
527
|
+
</div>
|
528
|
+
|
529
|
+
</div>
|
530
|
+
|
531
|
+
|
532
|
+
|
533
|
+
|
534
|
+
</div>
|
535
|
+
|
536
|
+
|
537
|
+
</div>
|
538
|
+
|
539
|
+
|
540
|
+
</div>
|
541
|
+
|
542
|
+
|
543
|
+
<div id="rdoc-debugging-section-dump" class="debugging-section">
|
544
|
+
|
545
|
+
<p>Disabled; run with --debug to generate this.</p>
|
546
|
+
|
547
|
+
</div>
|
548
|
+
|
549
|
+
<div id="validator-badges">
|
550
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
551
|
+
<p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
|
552
|
+
Rdoc Generator</a> 1.1.6</small>.</p>
|
553
|
+
</div>
|
554
|
+
|
555
|
+
</body>
|
556
|
+
</html>
|
557
|
+
|