rbatch 2.1.1 → 2.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.ja.md +14 -5
- data/README.md +164 -154
- data/bin/rbatch-init +21 -13
- data/doc/RBatch/Cmd.html +300 -316
- data/doc/RBatch/CmdException.html +146 -141
- data/doc/RBatch/CmdResult.html +467 -470
- data/doc/RBatch/Config.html +392 -433
- data/doc/RBatch/Controller.html +374 -0
- data/doc/RBatch/DoubleRunCheckException.html +146 -141
- data/doc/RBatch/DoubleRunChecker.html +258 -256
- data/doc/RBatch/Journal.html +332 -0
- data/doc/RBatch/Log.html +636 -805
- data/doc/RBatch/LogException.html +164 -0
- data/doc/RBatch/RBatch/RBatch/ConfigException.html +164 -0
- data/doc/RBatch/RBatch/RBatch.html +163 -0
- data/doc/RBatch/RBatch/VariablesException.html +164 -0
- data/doc/RBatch/RBatch.html +165 -0
- data/doc/RBatch/RunConf/Exception.html +146 -141
- data/doc/RBatch/RunConf.html +478 -532
- data/doc/RBatch/Variables.html +437 -0
- data/doc/RBatch.html +388 -862
- data/doc/created.rid +11 -9
- data/doc/index.html +178 -184
- data/doc/js/darkfish.js +9 -7
- data/doc/lib/rbatch/cmd_rb.html +46 -44
- data/doc/lib/rbatch/config_rb.html +42 -42
- data/doc/lib/rbatch/controller_rb.html +66 -0
- data/doc/lib/rbatch/double_run_checker_rb.html +42 -42
- data/doc/lib/rbatch/journal_rb.html +52 -0
- data/doc/lib/rbatch/log_rb.html +46 -46
- data/doc/lib/rbatch/run_conf_rb.html +42 -42
- data/doc/lib/rbatch/variables_rb.html +54 -0
- data/doc/lib/rbatch/version_rb.html +38 -38
- data/doc/lib/rbatch_rb.html +40 -52
- data/doc/rdoc.css +365 -308
- data/lib/rbatch/cmd.rb +15 -58
- data/lib/rbatch/config.rb +7 -7
- data/lib/rbatch/controller.rb +37 -61
- data/lib/rbatch/double_run_checker.rb +0 -0
- data/lib/rbatch/journal.rb +40 -0
- data/lib/rbatch/log.rb +71 -129
- data/lib/rbatch/run_conf.rb +13 -24
- data/lib/rbatch/variables.rb +82 -0
- data/lib/rbatch/version.rb +1 -1
- data/lib/rbatch.rb +7 -36
- data/sample/.rbatchrc +41 -7
- data/spec/01_rbach_spec.rb +99 -0
- data/spec/{cmd_spec.rb → rbatch/cmd_spec.rb} +40 -43
- data/spec/rbatch/config_spec.rb +67 -0
- data/spec/rbatch/controller_spec.rb +18 -0
- data/spec/{double_run_checker_spec.rb → rbatch/double_run_checker_spec.rb} +3 -0
- data/spec/rbatch/journal_spec.rb +29 -0
- data/spec/rbatch/log_spec.rb +350 -0
- data/spec/{run_conf_spec.rb → rbatch/run_conf_spec.rb} +13 -5
- data/spec/rbatch/variables_spec.rb +68 -0
- data/spec/spec_helper.rb +4 -5
- metadata +33 -17
- data/lib/rbatch/common_config.rb +0 -0
- data/spec/common_config_spec.rb +0 -85
- data/spec/config_spec.rb +0 -79
- data/spec/log_spec.rb +0 -430
- data/spec/rbatch_spec.rb +0 -22
data/doc/RBatch/RunConf.html
CHANGED
@@ -1,556 +1,502 @@
|
|
1
|
-
<?xml version="1.0" encoding="
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
2
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
3
|
-
|
3
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
4
4
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
5
5
|
<head>
|
6
|
-
|
6
|
+
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
|
7
7
|
|
8
|
-
|
8
|
+
<title>Class: RBatch::RunConf</title>
|
9
9
|
|
10
|
-
|
10
|
+
<link rel="stylesheet" href="../rdoc.css" type="text/css" media="screen" />
|
11
11
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
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>
|
12
|
+
<script src="../js/jquery.js" type="text/javascript" charset="utf-8"></script>
|
13
|
+
<script src="../js/thickbox-compressed.js" type="text/javascript" charset="utf-8"></script>
|
14
|
+
<script src="../js/quicksearch.js" type="text/javascript" charset="utf-8"></script>
|
15
|
+
<script src="../js/darkfish.js" type="text/javascript" charset="utf-8"></script>
|
20
16
|
|
21
17
|
</head>
|
22
|
-
<body class="class">
|
18
|
+
<body id="top" class="class">
|
23
19
|
|
24
|
-
|
25
|
-
|
26
|
-
|
20
|
+
<div id="metadata">
|
21
|
+
<div id="home-metadata">
|
22
|
+
<div id="home-section" class="section">
|
27
23
|
<h3 class="section-header">
|
28
24
|
<a href="../index.html">Home</a>
|
29
25
|
<a href="../index.html#classes">Classes</a>
|
30
26
|
<a href="../index.html#methods">Methods</a>
|
31
27
|
</h3>
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
28
|
+
</div>
|
29
|
+
</div>
|
30
|
+
|
31
|
+
<div id="file-metadata">
|
32
|
+
<div id="file-list-section" class="section">
|
33
|
+
<h3 class="section-header">In Files</h3>
|
34
|
+
<div class="section-body">
|
35
|
+
<ul>
|
36
|
+
|
37
|
+
<li><a href="../lib/rbatch/run_conf_rb.html?TB_iframe=true&height=550&width=785"
|
38
|
+
class="thickbox" title="lib/rbatch/run_conf.rb">lib/rbatch/run_conf.rb</a></li>
|
39
|
+
|
40
|
+
</ul>
|
41
|
+
</div>
|
42
|
+
</div>
|
43
|
+
|
44
|
+
|
45
|
+
</div>
|
46
|
+
|
47
|
+
<div id="class-metadata">
|
48
|
+
|
49
|
+
<!-- Parent Class -->
|
50
|
+
<div id="parent-class-section" class="section">
|
51
|
+
<h3 class="section-header">Parent</h3>
|
52
|
+
|
53
|
+
<p class="link">Object</p>
|
54
|
+
|
55
|
+
</div>
|
56
|
+
|
57
|
+
|
58
|
+
|
59
|
+
|
60
|
+
|
61
|
+
<!-- Namespace Contents -->
|
62
|
+
<div id="namespace-list-section" class="section">
|
63
|
+
<h3 class="section-header">Namespace</h3>
|
64
|
+
<ul class="link-list">
|
65
|
+
|
66
|
+
<li><span class="type">CLASS</span> <a href="RunConf/Exception.html">RBatch::RunConf::Exception</a></li>
|
67
|
+
|
68
|
+
</ul>
|
69
|
+
</div>
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
<!-- Method Quickref -->
|
74
|
+
<div id="method-list-section" class="section">
|
75
|
+
<h3 class="section-header">Methods</h3>
|
76
|
+
<ul class="link-list">
|
77
|
+
|
78
|
+
<li><a href="#method-c-new">::new</a></li>
|
79
|
+
|
80
|
+
<li><a href="#method-i-5B-5D">#[]</a></li>
|
81
|
+
|
82
|
+
<li><a href="#method-i-5B-5D-3D">#[]=</a></li>
|
83
|
+
|
84
|
+
<li><a href="#method-i-has_key-3F">#has_key?</a></li>
|
85
|
+
|
86
|
+
<li><a href="#method-i-load">#load</a></li>
|
87
|
+
|
88
|
+
<li><a href="#method-i-merge">#merge</a></li>
|
89
|
+
|
90
|
+
<li><a href="#method-i-merge-21">#merge!</a></li>
|
91
|
+
|
92
|
+
</ul>
|
93
|
+
</div>
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
</div>
|
98
|
+
|
99
|
+
<div id="project-metadata">
|
100
|
+
|
101
|
+
|
102
|
+
|
103
|
+
<div id="classindex-section" class="section project-section">
|
104
|
+
<h3 class="section-header">Class/Module 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="../RBatch.html">RBatch</a></li>
|
119
|
+
|
120
|
+
<li><a href="../RBatch/Cmd.html">RBatch::Cmd</a></li>
|
121
|
+
|
122
|
+
<li><a href="../RBatch/CmdException.html">RBatch::CmdException</a></li>
|
123
|
+
|
124
|
+
<li><a href="../RBatch/CmdResult.html">RBatch::CmdResult</a></li>
|
125
|
+
|
126
|
+
<li><a href="../RBatch/Config.html">RBatch::Config</a></li>
|
127
|
+
|
128
|
+
<li><a href="../RBatch/Controller.html">RBatch::Controller</a></li>
|
129
|
+
|
130
|
+
<li><a href="../RBatch/DoubleRunCheckException.html">RBatch::DoubleRunCheckException</a></li>
|
131
|
+
|
132
|
+
<li><a href="../RBatch/DoubleRunChecker.html">RBatch::DoubleRunChecker</a></li>
|
133
|
+
|
134
|
+
<li><a href="../RBatch/Journal.html">RBatch::Journal</a></li>
|
135
|
+
|
136
|
+
<li><a href="../RBatch/Log.html">RBatch::Log</a></li>
|
137
|
+
|
138
|
+
<li><a href="../RBatch/LogException.html">RBatch::LogException</a></li>
|
139
|
+
|
140
|
+
<li><a href="../RBatch/RBatch.html">RBatch::RBatch</a></li>
|
141
|
+
|
142
|
+
<li><a href="../RBatch/RBatch/RBatch.html">RBatch::RBatch::RBatch</a></li>
|
143
|
+
|
144
|
+
<li><a href="../RBatch/RBatch/RBatch/ConfigException.html">RBatch::RBatch::RBatch::ConfigException</a></li>
|
145
|
+
|
146
|
+
<li><a href="../RBatch/RBatch/VariablesException.html">RBatch::RBatch::VariablesException</a></li>
|
147
|
+
|
148
|
+
<li><a href="../RBatch/RunConf.html">RBatch::RunConf</a></li>
|
149
|
+
|
150
|
+
<li><a href="../RBatch/RunConf/Exception.html">RBatch::RunConf::Exception</a></li>
|
151
|
+
|
152
|
+
<li><a href="../RBatch/Variables.html">RBatch::Variables</a></li>
|
153
|
+
|
154
|
+
</ul>
|
155
|
+
<div id="no-class-search-results" style="display: none;">No matching classes.</div>
|
156
|
+
</div>
|
157
|
+
|
158
|
+
|
159
|
+
</div>
|
160
|
+
</div>
|
161
|
+
|
162
|
+
<div id="documentation">
|
163
|
+
<h1 class="class">RBatch::RunConf</h1>
|
164
|
+
|
165
|
+
<div id="description" class="description">
|
166
|
+
|
167
|
+
</div><!-- description -->
|
168
|
+
|
169
|
+
|
170
|
+
|
171
|
+
|
172
|
+
<div id="5Buntitled-5D" class="documentation-section">
|
173
|
+
|
174
|
+
|
175
|
+
|
176
|
+
|
177
|
+
|
178
|
+
|
179
|
+
|
180
|
+
<!-- Attributes -->
|
181
|
+
<div id="attribute-method-details" class="method-section section">
|
182
|
+
<h3 class="section-header">Attributes</h3>
|
183
|
+
|
184
|
+
|
185
|
+
<div id="path-attribute-method" class="method-detail">
|
186
|
+
<a name="path"></a>
|
187
|
+
|
188
|
+
<a name="path="></a>
|
189
|
+
|
190
|
+
<div class="method-heading attribute-method-heading">
|
191
|
+
<span class="method-name">path</span><span
|
192
|
+
class="attribute-access-type">[RW]</span>
|
193
|
+
</div>
|
194
|
+
|
195
|
+
<div class="method-description">
|
196
|
+
|
197
|
+
|
198
|
+
|
199
|
+
</div>
|
200
|
+
</div>
|
201
|
+
|
202
|
+
</div><!-- attribute-method-details -->
|
203
|
+
|
204
|
+
|
205
|
+
<!-- Methods -->
|
206
|
+
|
207
|
+
<div id="public-class-method-details" class="method-section section">
|
208
|
+
<h3 class="section-header">Public Class Methods</h3>
|
209
|
+
|
210
|
+
|
211
|
+
<div id="new-method" class="method-detail ">
|
212
|
+
<a name="method-c-new"></a>
|
213
|
+
|
214
|
+
|
215
|
+
<div class="method-heading">
|
216
|
+
<span class="method-name">new</span><span
|
217
|
+
class="method-args">(path=nil)</span>
|
218
|
+
<span class="method-click-advice">click to toggle source</span>
|
219
|
+
</div>
|
220
|
+
|
221
|
+
|
222
|
+
<div class="method-description">
|
223
|
+
|
224
|
+
|
225
|
+
|
226
|
+
|
227
|
+
|
228
|
+
<div class="method-source-code" id="new-source">
|
232
229
|
<pre>
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
230
|
+
<span class="ruby-comment"># File lib/rbatch/run_conf.rb, line 30</span>
|
231
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">path</span>=<span class="ruby-keyword">nil</span>)
|
232
|
+
<span class="ruby-keyword">if</span> <span class="ruby-identifier">path</span>.<span class="ruby-identifier">nil?</span>
|
233
|
+
<span class="ruby-ivar">@opt</span> = <span class="ruby-identifier">@@def_opt</span>.<span class="ruby-identifier">clone</span>
|
234
|
+
<span class="ruby-keyword">else</span>
|
235
|
+
<span class="ruby-ivar">@path</span> = <span class="ruby-identifier">path</span>
|
236
|
+
<span class="ruby-ivar">@opt</span> = <span class="ruby-identifier">@@def_opt</span>.<span class="ruby-identifier">clone</span>
|
237
|
+
<span class="ruby-identifier">load</span>
|
238
|
+
<span class="ruby-keyword">end</span>
|
239
|
+
<span class="ruby-keyword">end</span></pre>
|
240
|
+
</div><!-- new-source -->
|
241
|
+
|
242
|
+
</div>
|
243
|
+
|
244
|
+
|
245
|
+
|
246
|
+
|
247
|
+
</div><!-- new-method -->
|
248
|
+
|
249
|
+
|
250
|
+
</div><!-- public-class-method-details -->
|
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="5B-5D-method" class="method-detail ">
|
257
|
+
<a name="method-i-5B-5D"></a>
|
258
|
+
|
259
|
+
|
260
|
+
<div class="method-heading">
|
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
|
+
</div>
|
265
|
+
|
266
|
+
|
267
|
+
<div class="method-description">
|
268
|
+
|
269
|
+
|
270
|
+
|
271
|
+
|
272
|
+
|
273
|
+
<div class="method-source-code" id="5B-5D-source">
|
275
274
|
<pre>
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
id="--source">
|
275
|
+
<span class="ruby-comment"># File lib/rbatch/run_conf.rb, line 84</span>
|
276
|
+
<span class="ruby-keyword">def</span><span class="ruby-operator">[]</span>(<span class="ruby-identifier">key</span>)
|
277
|
+
<span class="ruby-keyword">if</span> <span class="ruby-ivar">@opt</span>[<span class="ruby-identifier">key</span>].<span class="ruby-identifier">nil?</span>
|
278
|
+
<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>
|
279
|
+
<span class="ruby-keyword">end</span>
|
280
|
+
<span class="ruby-ivar">@opt</span>[<span class="ruby-identifier">key</span>]
|
281
|
+
<span class="ruby-keyword">end</span></pre>
|
282
|
+
</div><!-- 5B-5D-source -->
|
283
|
+
|
284
|
+
</div>
|
285
|
+
|
286
|
+
|
287
|
+
|
288
|
+
|
289
|
+
</div><!-- 5B-5D-method -->
|
290
|
+
|
291
|
+
|
292
|
+
<div id="5B-5D-3D-method" class="method-detail ">
|
293
|
+
<a name="method-i-5B-5D-3D"></a>
|
294
|
+
|
295
|
+
|
296
|
+
<div class="method-heading">
|
297
|
+
<span class="method-name">[]=</span><span
|
298
|
+
class="method-args">(key,value)</span>
|
299
|
+
<span class="method-click-advice">click to toggle source</span>
|
300
|
+
</div>
|
301
|
+
|
302
|
+
|
303
|
+
<div class="method-description">
|
304
|
+
|
305
|
+
|
306
|
+
|
307
|
+
|
308
|
+
|
309
|
+
<div class="method-source-code" id="5B-5D-3D-source">
|
312
310
|
<pre>
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
id="load-source">
|
311
|
+
<span class="ruby-comment"># File lib/rbatch/run_conf.rb, line 91</span>
|
312
|
+
<span class="ruby-keyword">def</span><span class="ruby-operator">[]=</span>(<span class="ruby-identifier">key</span>,<span class="ruby-identifier">value</span>)
|
313
|
+
<span class="ruby-keyword">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>)
|
314
|
+
<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>
|
315
|
+
<span class="ruby-keyword">end</span>
|
316
|
+
<span class="ruby-ivar">@opt</span>[<span class="ruby-identifier">key</span>]=<span class="ruby-identifier">value</span>
|
317
|
+
<span class="ruby-keyword">end</span></pre>
|
318
|
+
</div><!-- 5B-5D-3D-source -->
|
319
|
+
|
320
|
+
</div>
|
321
|
+
|
322
|
+
|
323
|
+
|
324
|
+
|
325
|
+
</div><!-- 5B-5D-3D-method -->
|
326
|
+
|
327
|
+
|
328
|
+
<div id="has_key-3F-method" class="method-detail ">
|
329
|
+
<a name="method-i-has_key-3F"></a>
|
330
|
+
|
331
|
+
|
332
|
+
<div class="method-heading">
|
333
|
+
<span class="method-name">has_key?</span><span
|
334
|
+
class="method-args">(key)</span>
|
335
|
+
<span class="method-click-advice">click to toggle source</span>
|
336
|
+
</div>
|
337
|
+
|
338
|
+
|
339
|
+
<div class="method-description">
|
340
|
+
|
341
|
+
|
342
|
+
|
343
|
+
|
344
|
+
|
345
|
+
<div class="method-source-code" id="has_key-3F-source">
|
349
346
|
<pre>
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
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">
|
347
|
+
<span class="ruby-comment"># File lib/rbatch/run_conf.rb, line 58</span>
|
348
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">key</span>)
|
349
|
+
<span class="ruby-ivar">@opt</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">key</span>)
|
350
|
+
<span class="ruby-keyword">end</span></pre>
|
351
|
+
</div><!-- has_key-3F-source -->
|
352
|
+
|
353
|
+
</div>
|
354
|
+
|
355
|
+
|
356
|
+
|
357
|
+
|
358
|
+
</div><!-- has_key-3F-method -->
|
359
|
+
|
360
|
+
|
361
|
+
<div id="load-method" class="method-detail ">
|
362
|
+
<a name="method-i-load"></a>
|
363
|
+
|
364
|
+
|
365
|
+
<div class="method-heading">
|
366
|
+
<span class="method-name">load</span><span
|
367
|
+
class="method-args">()</span>
|
368
|
+
<span class="method-click-advice">click to toggle source</span>
|
369
|
+
</div>
|
370
|
+
|
371
|
+
|
372
|
+
<div class="method-description">
|
373
|
+
|
374
|
+
|
375
|
+
|
376
|
+
|
377
|
+
|
378
|
+
<div class="method-source-code" id="load-source">
|
397
379
|
<pre>
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
380
|
+
<span class="ruby-comment"># File lib/rbatch/run_conf.rb, line 40</span>
|
381
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">load</span>()
|
382
|
+
<span class="ruby-keyword">begin</span>
|
383
|
+
<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">@path</span>)
|
384
|
+
<span class="ruby-keyword">rescue</span>
|
385
|
+
<span class="ruby-comment"># when run_conf does not exist, do nothing.</span>
|
386
|
+
<span class="ruby-ivar">@yaml</span> = <span class="ruby-keyword">false</span>
|
387
|
+
<span class="ruby-keyword">end</span>
|
388
|
+
<span class="ruby-keyword">if</span> <span class="ruby-ivar">@yaml</span>
|
389
|
+
<span class="ruby-ivar">@yaml</span>.<span class="ruby-identifier">each_key</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">key</span><span class="ruby-operator">|</span>
|
390
|
+
<span class="ruby-keyword">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>)
|
391
|
+
<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>]
|
392
|
+
<span class="ruby-keyword">else</span>
|
393
|
+
<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>
|
394
|
+
<span class="ruby-keyword">end</span>
|
395
|
+
<span class="ruby-keyword">end</span>
|
396
|
+
<span class="ruby-keyword">end</span>
|
397
|
+
<span class="ruby-keyword">end</span></pre>
|
398
|
+
</div><!-- load-source -->
|
399
|
+
|
400
|
+
</div>
|
401
|
+
|
402
|
+
|
403
|
+
|
404
|
+
|
405
|
+
</div><!-- load-method -->
|
406
|
+
|
407
|
+
|
408
|
+
<div id="merge-method" class="method-detail ">
|
409
|
+
<a name="method-i-merge"></a>
|
410
|
+
|
411
|
+
|
412
|
+
<div class="method-heading">
|
413
|
+
<span class="method-name">merge</span><span
|
414
|
+
class="method-args">(opt)</span>
|
415
|
+
<span class="method-click-advice">click to toggle source</span>
|
416
|
+
</div>
|
417
|
+
|
418
|
+
|
419
|
+
<div class="method-description">
|
420
|
+
|
421
|
+
|
422
|
+
|
423
|
+
|
424
|
+
|
425
|
+
<div class="method-source-code" id="merge-source">
|
439
426
|
<pre>
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
|
427
|
+
<span class="ruby-comment"># File lib/rbatch/run_conf.rb, line 72</span>
|
428
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">merge</span>(<span class="ruby-identifier">opt</span>)
|
429
|
+
<span class="ruby-identifier">tmp</span> = <span class="ruby-ivar">@opt</span>.<span class="ruby-identifier">clone</span>
|
430
|
+
<span class="ruby-identifier">opt</span>.<span class="ruby-identifier">each_key</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">key</span><span class="ruby-operator">|</span>
|
431
|
+
<span class="ruby-keyword">if</span> <span class="ruby-identifier">tmp</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">key</span>)
|
432
|
+
<span class="ruby-identifier">tmp</span>[<span class="ruby-identifier">key</span>] = <span class="ruby-identifier">opt</span>[<span class="ruby-identifier">key</span>]
|
433
|
+
<span class="ruby-keyword">else</span>
|
434
|
+
<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>
|
435
|
+
<span class="ruby-keyword">end</span>
|
436
|
+
<span class="ruby-keyword">end</span>
|
437
|
+
<span class="ruby-keyword">return</span> <span class="ruby-identifier">tmp</span>
|
438
|
+
<span class="ruby-keyword">end</span></pre>
|
439
|
+
</div><!-- merge-source -->
|
440
|
+
|
441
|
+
</div>
|
442
|
+
|
443
|
+
|
444
|
+
|
445
|
+
|
446
|
+
</div><!-- merge-method -->
|
447
|
+
|
448
|
+
|
449
|
+
<div id="merge-21-method" class="method-detail ">
|
450
|
+
<a name="method-i-merge-21"></a>
|
451
|
+
|
452
|
+
|
453
|
+
<div class="method-heading">
|
454
|
+
<span class="method-name">merge!</span><span
|
455
|
+
class="method-args">(opt)</span>
|
456
|
+
<span class="method-click-advice">click to toggle source</span>
|
457
|
+
</div>
|
458
|
+
|
459
|
+
|
460
|
+
<div class="method-description">
|
461
|
+
|
462
|
+
|
463
|
+
|
464
|
+
|
465
|
+
|
466
|
+
<div class="method-source-code" id="merge-21-source">
|
479
467
|
<pre>
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
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 38</span>
|
516
|
-
38: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">reset</span>()
|
517
|
-
39: <span class="ruby-ivar">@opt</span> = <span class="ruby-identifier">@@def_opt</span>.<span class="ruby-identifier">clone</span>
|
518
|
-
40: <span class="ruby-keyword kw">case</span> <span class="ruby-constant">RUBY_PLATFORM</span>
|
519
|
-
41: <span class="ruby-keyword kw">when</span> <span class="ruby-regexp re">/mswin|mingw/</span>
|
520
|
-
42: <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
|
-
43: <span class="ruby-keyword kw">when</span> <span class="ruby-regexp re">/cygwin|linux/</span>
|
522
|
-
44: <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
|
-
45: <span class="ruby-keyword kw">else</span>
|
524
|
-
46: <span class="ruby-ivar">@opt</span>[<span class="ruby-value">:log_hostname</span>] = <span class="ruby-value str">"unknownhost"</span>
|
525
|
-
47: <span class="ruby-keyword kw">end</span>
|
526
|
-
48: <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>
|
468
|
+
<span class="ruby-comment"># File lib/rbatch/run_conf.rb, line 62</span>
|
469
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">merge!</span>(<span class="ruby-identifier">opt</span>)
|
470
|
+
<span class="ruby-identifier">opt</span>.<span class="ruby-identifier">each_key</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">key</span><span class="ruby-operator">|</span>
|
471
|
+
<span class="ruby-keyword">if</span> <span class="ruby-ivar">@opt</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">key</span>)
|
472
|
+
<span class="ruby-ivar">@opt</span>[<span class="ruby-identifier">key</span>] = <span class="ruby-identifier">opt</span>[<span class="ruby-identifier">key</span>]
|
473
|
+
<span class="ruby-keyword">else</span>
|
474
|
+
<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>
|
475
|
+
<span class="ruby-keyword">end</span>
|
476
|
+
<span class="ruby-keyword">end</span>
|
477
|
+
<span class="ruby-keyword">end</span></pre>
|
478
|
+
</div><!-- merge-21-source -->
|
479
|
+
|
480
|
+
</div>
|
481
|
+
|
482
|
+
|
483
|
+
|
484
|
+
|
485
|
+
</div><!-- merge-21-method -->
|
486
|
+
|
487
|
+
|
488
|
+
</div><!-- public-instance-method-details -->
|
489
|
+
|
490
|
+
</div><!-- 5Buntitled-5D -->
|
491
|
+
|
492
|
+
|
493
|
+
</div><!-- documentation -->
|
494
|
+
|
495
|
+
<div id="validator-badges">
|
496
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
497
|
+
<p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
|
498
|
+
Rdoc Generator</a> 2</small>.</p>
|
499
|
+
</div>
|
554
500
|
|
555
501
|
</body>
|
556
502
|
</html>
|