sprout 1.1.11.pre → 1.1.13.pre
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of sprout might be problematic. Click here for more details.
- data/Gemfile.lock +3 -4
- data/VERSION +1 -1
- data/doc/Dir.html +288 -0
- data/doc/Rake/Task.html +184 -0
- data/doc/Sprout.html +740 -0
- data/doc/Sprout/ArchiveUnpacker.html +1246 -0
- data/doc/Sprout/CommandLine.html +520 -0
- data/doc/Sprout/Concern.html +351 -0
- data/doc/Sprout/Errors.html +101 -0
- data/doc/Sprout/Errors/ArchiveUnpackerError.html +125 -0
- data/doc/Sprout/Errors/DestinationExistsError.html +133 -0
- data/doc/Sprout/Errors/DuplicateMemberError.html +132 -0
- data/doc/Sprout/Errors/ExecutableError.html +125 -0
- data/doc/Sprout/Errors/ExecutableRegistrationError.html +132 -0
- data/doc/Sprout/Errors/ExecutionError.html +121 -0
- data/doc/Sprout/Errors/GeneratorError.html +125 -0
- data/doc/Sprout/Errors/InvalidArgumentError.html +132 -0
- data/doc/Sprout/Errors/LoadError.html +121 -0
- data/doc/Sprout/Errors/MissingArgumentError.html +132 -0
- data/doc/Sprout/Errors/MissingExecutableError.html +132 -0
- data/doc/Sprout/Errors/MissingGeneratorError.html +132 -0
- data/doc/Sprout/Errors/MissingTemplateError.html +132 -0
- data/doc/Sprout/Errors/ProcessRunnerError.html +121 -0
- data/doc/Sprout/Errors/RemoteFileLoaderError.html +110 -0
- data/doc/Sprout/Errors/SproutError.html +114 -0
- data/doc/Sprout/Errors/UnknownArchiveType.html +122 -0
- data/doc/Sprout/Errors/UsageError.html +121 -0
- data/doc/Sprout/Errors/ValidationError.html +121 -0
- data/doc/Sprout/Errors/VersionRequirementNotMetError.html +121 -0
- data/doc/Sprout/Executable.html +169 -0
- data/doc/Sprout/Executable/Base.html +2813 -0
- data/doc/Sprout/Executable/Boolean.html +534 -0
- data/doc/Sprout/Executable/CollectionParam.html +483 -0
- data/doc/Sprout/Executable/FileParam.html +484 -0
- data/doc/Sprout/Executable/Files.html +292 -0
- data/doc/Sprout/Executable/Number.html +141 -0
- data/doc/Sprout/Executable/Param.html +2874 -0
- data/doc/Sprout/Executable/ParameterFactory.html +232 -0
- data/doc/Sprout/Executable/Path.html +223 -0
- data/doc/Sprout/Executable/Paths.html +253 -0
- data/doc/Sprout/Executable/Session.html +1513 -0
- data/doc/Sprout/Executable/StringParam.html +213 -0
- data/doc/Sprout/Executable/Strings.html +167 -0
- data/doc/Sprout/Executable/Url.html +160 -0
- data/doc/Sprout/Executable/Urls.html +170 -0
- data/doc/Sprout/FileTarget.html +1109 -0
- data/doc/Sprout/Generator.html +750 -0
- data/doc/Sprout/Generator/Base.html +1902 -0
- data/doc/Sprout/Generator/Command.html +690 -0
- data/doc/Sprout/Generator/DirectoryManifest.html +476 -0
- data/doc/Sprout/Generator/FileManifest.html +643 -0
- data/doc/Sprout/Generator/Manifest.html +377 -0
- data/doc/Sprout/Generator/TemplateManifest.html +194 -0
- data/doc/Sprout/GeneratorGenerator.html +1115 -0
- data/doc/Sprout/Library.html +1146 -0
- data/doc/Sprout/LibraryGenerator.html +331 -0
- data/doc/Sprout/OutputBuffer.html +445 -0
- data/doc/Sprout/Platform.html +714 -0
- data/doc/Sprout/ProcessRunner.html +1707 -0
- data/doc/Sprout/ProgressBar.html +366 -0
- data/doc/Sprout/ProgressBarImpl.html +2109 -0
- data/doc/Sprout/ProgressBarManager.html +424 -0
- data/doc/Sprout/ProgressBarOutputStream.html +406 -0
- data/doc/Sprout/RDocParser.html +211 -0
- data/doc/Sprout/RemoteFileLoader.html +172 -0
- data/doc/Sprout/RemoteFileTarget.html +679 -0
- data/doc/Sprout/ReversedProgressBar.html +184 -0
- data/doc/Sprout/RubyFeature.html +155 -0
- data/doc/Sprout/RubyFeature/ClassMethods.html +1065 -0
- data/doc/Sprout/RubyGenerator.html +786 -0
- data/doc/Sprout/Specification.html +767 -0
- data/doc/Sprout/System.html +191 -0
- data/doc/Sprout/System/BaseSystem.html +1660 -0
- data/doc/Sprout/System/JavaSystem.html +122 -0
- data/doc/Sprout/System/OSXSystem.html +335 -0
- data/doc/Sprout/System/ThreadMock.html +183 -0
- data/doc/Sprout/System/UnixSystem.html +584 -0
- data/doc/Sprout/System/VistaSystem.html +251 -0
- data/doc/Sprout/System/WinNixSystem.html +325 -0
- data/doc/Sprout/System/WinSystem.html +571 -0
- data/doc/Sprout/TestHelper.html +2165 -0
- data/doc/Sprout/ToolGenerator.html +953 -0
- data/doc/Sprout/VERSION.html +118 -0
- data/doc/String.html +290 -0
- data/doc/_index.html +820 -0
- data/doc/class_list.html +36 -0
- data/doc/css/common.css +1 -0
- data/doc/css/full_list.css +53 -0
- data/doc/css/style.css +310 -0
- data/doc/file.README.html +96 -0
- data/doc/file_list.html +41 -0
- data/doc/frames.html +13 -0
- data/doc/index.html +96 -0
- data/doc/js/app.js +202 -0
- data/doc/js/full_list.js +149 -0
- data/doc/js/jquery.js +154 -0
- data/doc/method_list.html +3603 -0
- data/doc/top-level-namespace.html +192 -0
- data/lib/sprout.rb +1 -0
- data/lib/sprout/executable/base.rb +2 -5
- data/lib/sprout/executable/param.rb +15 -8
- data/lib/sprout/executable/session.rb +1 -1
- data/lib/sprout/library.rb +44 -2
- data/test/unit/executable_test.rb +3 -5
- metadata +99 -3
@@ -0,0 +1,292 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
|
+
<head>
|
5
|
+
<meta name="Content-Type" content="text/html; charset=utf-8" />
|
6
|
+
<title>Class: Sprout::Executable::Files</title>
|
7
|
+
<link rel="stylesheet" href="../../css/style.css" type="text/css" media="screen" charset="utf-8" />
|
8
|
+
<link rel="stylesheet" href="../../css/common.css" type="text/css" media="screen" charset="utf-8" />
|
9
|
+
|
10
|
+
<script type="text/javascript" charset="utf-8">
|
11
|
+
relpath = '../..';
|
12
|
+
if (relpath != '') relpath += '/';
|
13
|
+
</script>
|
14
|
+
<script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
|
15
|
+
<script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
|
16
|
+
|
17
|
+
</head>
|
18
|
+
<body>
|
19
|
+
<script type="text/javascript" charset="utf-8">
|
20
|
+
if (window.top.frames.main) document.body.className = 'frames';
|
21
|
+
</script>
|
22
|
+
|
23
|
+
<div id="header">
|
24
|
+
<div id="menu">
|
25
|
+
|
26
|
+
<a href="../../_index.html">Index (F)</a> »
|
27
|
+
<span class='title'><span class='object_link'><a href="../../Sprout.html" title="Sprout (module)">Sprout</a></span></span> » <span class='title'><span class='object_link'><a href="../Executable.html" title="Sprout::Executable (module)">Executable</a></span></span>
|
28
|
+
»
|
29
|
+
<span class="title">Files</span>
|
30
|
+
|
31
|
+
|
32
|
+
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
33
|
+
</div>
|
34
|
+
|
35
|
+
<div id="search">
|
36
|
+
<a id="class_list_link" href="#">Class List</a>
|
37
|
+
<a id="method_list_link" href="#">Method List</a>
|
38
|
+
<a id ="file_list_link" href="#">File List</a>
|
39
|
+
</div>
|
40
|
+
|
41
|
+
<div class="clear"></div>
|
42
|
+
</div>
|
43
|
+
|
44
|
+
<iframe id="search_frame"></iframe>
|
45
|
+
|
46
|
+
<div id="content"><h1>Class: Sprout::Executable::Files
|
47
|
+
|
48
|
+
|
49
|
+
|
50
|
+
</h1>
|
51
|
+
|
52
|
+
<dl class="box">
|
53
|
+
|
54
|
+
<dt class="r1">Inherits:</dt>
|
55
|
+
<dd class="r1">
|
56
|
+
<span class="inheritName"><span class='object_link'><a href="Param.html" title="Sprout::Executable::Param (class)">Param</a></span></span>
|
57
|
+
|
58
|
+
<ul class="fullTree">
|
59
|
+
<li>Object</li>
|
60
|
+
|
61
|
+
<li class="next"><span class='object_link'><a href="Param.html" title="Sprout::Executable::Param (class)">Param</a></span></li>
|
62
|
+
|
63
|
+
<li class="next">Sprout::Executable::Files</li>
|
64
|
+
|
65
|
+
</ul>
|
66
|
+
<a href="#" class="inheritanceTree">show all</a>
|
67
|
+
|
68
|
+
</dd>
|
69
|
+
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
|
74
|
+
|
75
|
+
<dt class="r2">Includes:</dt>
|
76
|
+
<dd class="r2"><span class='object_link'><a href="CollectionParam.html" title="Sprout::Executable::CollectionParam (module)">CollectionParam</a></span></dd>
|
77
|
+
|
78
|
+
|
79
|
+
|
80
|
+
|
81
|
+
|
82
|
+
<dt class="r1 last">Defined in:</dt>
|
83
|
+
<dd class="r1 last">lib/sprout/executable/files.rb</dd>
|
84
|
+
|
85
|
+
</dl>
|
86
|
+
<div class="clear"></div>
|
87
|
+
|
88
|
+
<h2>Overview</h2><div class="docstring">
|
89
|
+
<div class="discussion">
|
90
|
+
|
91
|
+
<p>Concrete param object for collections of files</p>
|
92
|
+
|
93
|
+
|
94
|
+
</div>
|
95
|
+
</div>
|
96
|
+
<div class="tags">
|
97
|
+
|
98
|
+
<h3>See Also:</h3>
|
99
|
+
<ul class="see">
|
100
|
+
|
101
|
+
<li><span class='object_link'><a href="FileParam.html" title="Sprout::Executable::FileParam (class)">FileParam</a></span></li>
|
102
|
+
|
103
|
+
<li><span class='object_link'><a href="Param.html" title="Sprout::Executable::Param (class)">Param</a></span></li>
|
104
|
+
|
105
|
+
<li><span class='object_link'><a href="CollectionParam.html" title="Sprout::Executable::CollectionParam (module)">CollectionParam</a></span></li>
|
106
|
+
|
107
|
+
</ul>
|
108
|
+
|
109
|
+
</div><div id="subclasses">
|
110
|
+
<h2>Direct Known Subclasses</h2>
|
111
|
+
<p class="children"><span class='object_link'><a href="Paths.html" title="Sprout::Executable::Paths (class)">Paths</a></span></p>
|
112
|
+
</div>
|
113
|
+
|
114
|
+
<h2>Constant Summary</h2>
|
115
|
+
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
|
122
|
+
|
123
|
+
|
124
|
+
|
125
|
+
|
126
|
+
<h3 class="inherited">Constants inherited from <span class='object_link'><a href="Param.html" title="Sprout::Executable::Param (class)">Param</a></span></h3>
|
127
|
+
<p class="inherited"><span class='object_link'><a href="Param.html#DEFAULT_DELIMITER-constant" title="Sprout::Executable::Param::DEFAULT_DELIMITER (constant)">DEFAULT_DELIMITER</a></span>, <span class='object_link'><a href="Param.html#DEFAULT_OPTION_PARSER_TYPE_NAME-constant" title="Sprout::Executable::Param::DEFAULT_OPTION_PARSER_TYPE_NAME (constant)">DEFAULT_OPTION_PARSER_TYPE_NAME</a></span>, <span class='object_link'><a href="Param.html#DEFAULT_PREFIX-constant" title="Sprout::Executable::Param::DEFAULT_PREFIX (constant)">DEFAULT_PREFIX</a></span>, <span class='object_link'><a href="Param.html#DEFAULT_SHORT_PREFIX-constant" title="Sprout::Executable::Param::DEFAULT_SHORT_PREFIX (constant)">DEFAULT_SHORT_PREFIX</a></span></p>
|
128
|
+
|
129
|
+
|
130
|
+
|
131
|
+
<h2>
|
132
|
+
Instance Method Summary
|
133
|
+
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
134
|
+
</h2>
|
135
|
+
|
136
|
+
<ul class="summary">
|
137
|
+
|
138
|
+
<li class="public ">
|
139
|
+
<span class="summary_signature">
|
140
|
+
|
141
|
+
<a href="#prepare_prerequisites-instance_method" title="#prepare_prerequisites (instance method)">- (Object) <strong>prepare_prerequisites</strong> </a>
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
</span>
|
146
|
+
|
147
|
+
|
148
|
+
|
149
|
+
|
150
|
+
|
151
|
+
|
152
|
+
|
153
|
+
|
154
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
155
|
+
|
156
|
+
</li>
|
157
|
+
|
158
|
+
|
159
|
+
<li class="public ">
|
160
|
+
<span class="summary_signature">
|
161
|
+
|
162
|
+
<a href="#to_shell_value-instance_method" title="#to_shell_value (instance method)">- (Object) <strong>to_shell_value</strong> </a>
|
163
|
+
|
164
|
+
|
165
|
+
|
166
|
+
</span>
|
167
|
+
|
168
|
+
|
169
|
+
|
170
|
+
|
171
|
+
|
172
|
+
|
173
|
+
|
174
|
+
|
175
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
176
|
+
|
177
|
+
</li>
|
178
|
+
|
179
|
+
|
180
|
+
</ul>
|
181
|
+
|
182
|
+
|
183
|
+
|
184
|
+
|
185
|
+
|
186
|
+
|
187
|
+
|
188
|
+
|
189
|
+
|
190
|
+
|
191
|
+
<h3 class="inherited">Methods included from <span class='object_link'><a href="CollectionParam.html" title="Sprout::Executable::CollectionParam (module)">CollectionParam</a></span></h3>
|
192
|
+
<p class="inherited"><span class='object_link'><a href="CollectionParam.html#initialize-instance_method" title="Sprout::Executable::CollectionParam#initialize (method)">#initialize</a></span>, <span class='object_link'><a href="CollectionParam.html#to_shell-instance_method" title="Sprout::Executable::CollectionParam#to_shell (method)">#to_shell</a></span>, <span class='object_link'><a href="CollectionParam.html#value%3D-instance_method" title="Sprout::Executable::CollectionParam#value= (method)">#value=</a></span>, <span class='object_link'><a href="CollectionParam.html#visible%3F-instance_method" title="Sprout::Executable::CollectionParam#visible? (method)">#visible?</a></span></p>
|
193
|
+
|
194
|
+
|
195
|
+
|
196
|
+
|
197
|
+
|
198
|
+
|
199
|
+
|
200
|
+
|
201
|
+
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="Param.html" title="Sprout::Executable::Param (class)">Param</a></span></h3>
|
202
|
+
<p class="inherited"><span class='object_link'><a href="Param.html#clean_path-instance_method" title="Sprout::Executable::Param#clean_path (method)">#clean_path</a></span>, <span class='object_link'><a href="Param.html#default-instance_method" title="Sprout::Executable::Param#default (method)">#default</a></span>, <span class='object_link'><a href="Param.html#default%3D-instance_method" title="Sprout::Executable::Param#default= (method)">#default=</a></span>, <span class='object_link'><a href="Param.html#default_option_parser_declaration-instance_method" title="Sprout::Executable::Param#default_option_parser_declaration (method)">#default_option_parser_declaration</a></span>, <span class='object_link'><a href="Param.html#file_is_output%3F-instance_method" title="Sprout::Executable::Param#file_is_output? (method)">#file_is_output?</a></span>, <span class='object_link'><a href="Param.html#hidden_name%3F-instance_method" title="Sprout::Executable::Param#hidden_name? (method)">#hidden_name?</a></span>, <span class='object_link'><a href="Param.html#hidden_value%3F-instance_method" title="Sprout::Executable::Param#hidden_value? (method)">#hidden_value?</a></span>, <span class='object_link'><a href="Param.html#initialize-instance_method" title="Sprout::Executable::Param#initialize (method)">#initialize</a></span>, <span class='object_link'><a href="Param.html#option_parser_declaration-instance_method" title="Sprout::Executable::Param#option_parser_declaration (method)">#option_parser_declaration</a></span>, <span class='object_link'><a href="Param.html#option_parser_name-instance_method" title="Sprout::Executable::Param#option_parser_name (method)">#option_parser_name</a></span>, <span class='object_link'><a href="Param.html#option_parser_short_name-instance_method" title="Sprout::Executable::Param#option_parser_short_name (method)">#option_parser_short_name</a></span>, <span class='object_link'><a href="Param.html#option_parser_type_name-instance_method" title="Sprout::Executable::Param#option_parser_type_name (method)">#option_parser_type_name</a></span>, <span class='object_link'><a href="Param.html#option_parser_type_output-instance_method" title="Sprout::Executable::Param#option_parser_type_output (method)">#option_parser_type_output</a></span>, <span class='object_link'><a href="Param.html#prepare-instance_method" title="Sprout::Executable::Param#prepare (method)">#prepare</a></span>, <span class='object_link'><a href="Param.html#prepared%3F-instance_method" title="Sprout::Executable::Param#prepared? (method)">#prepared?</a></span>, <span class='object_link'><a href="Param.html#required%3F-instance_method" title="Sprout::Executable::Param#required? (method)">#required?</a></span>, <span class='object_link'><a href="Param.html#shell_value-instance_method" title="Sprout::Executable::Param#shell_value (method)">#shell_value</a></span>, <span class='object_link'><a href="Param.html#short_prefix-instance_method" title="Sprout::Executable::Param#short_prefix (method)">#short_prefix</a></span>, <span class='object_link'><a href="Param.html#to_rdoc-instance_method" title="Sprout::Executable::Param#to_rdoc (method)">#to_rdoc</a></span>, <span class='object_link'><a href="Param.html#to_shell-instance_method" title="Sprout::Executable::Param#to_shell (method)">#to_shell</a></span>, <span class='object_link'><a href="Param.html#validate-instance_method" title="Sprout::Executable::Param#validate (method)">#validate</a></span>, <span class='object_link'><a href="Param.html#visible%3F-instance_method" title="Sprout::Executable::Param#visible? (method)">#visible?</a></span></p>
|
203
|
+
<div id="constructor_details" class="method_details_list">
|
204
|
+
<h2>Constructor Details</h2>
|
205
|
+
|
206
|
+
<p class="notice">This class inherits a constructor from <span class='object_link'><a href="CollectionParam.html#initialize-instance_method" title="Sprout::Executable::CollectionParam#initialize (method)">Sprout::Executable::CollectionParam</a></span></p>
|
207
|
+
|
208
|
+
</div>
|
209
|
+
|
210
|
+
|
211
|
+
<div id="instance_method_details" class="method_details_list">
|
212
|
+
<h2>Instance Method Details</h2>
|
213
|
+
|
214
|
+
|
215
|
+
<div class="method_details first">
|
216
|
+
<p class="signature first" id="prepare_prerequisites-instance_method">
|
217
|
+
|
218
|
+
- (<tt>Object</tt>) <strong>prepare_prerequisites</strong>
|
219
|
+
|
220
|
+
|
221
|
+
|
222
|
+
</p><table class="source_code">
|
223
|
+
<tr>
|
224
|
+
<td>
|
225
|
+
<pre class="lines">
|
226
|
+
|
227
|
+
|
228
|
+
21
|
229
|
+
22
|
230
|
+
23
|
231
|
+
24
|
232
|
+
25
|
233
|
+
26</pre>
|
234
|
+
</td>
|
235
|
+
<td>
|
236
|
+
<pre class="code"><span class="info file"># File 'lib/sprout/executable/files.rb', line 21</span>
|
237
|
+
|
238
|
+
<span class='kw'>def</span> <span class='id prepare_prerequisites'>prepare_prerequisites</span>
|
239
|
+
<span class='id value'>value</span><span class='period'>.</span><span class='id each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id f'>f</span><span class='op'>|</span>
|
240
|
+
<span class='id file'>file</span> <span class='id f'>f</span>
|
241
|
+
<span class='id belongs_to'>belongs_to</span><span class='period'>.</span><span class='id prerequisites'>prerequisites</span> <span class='op'><<</span> <span class='id f'>f</span>
|
242
|
+
<span class='kw'>end</span>
|
243
|
+
<span class='kw'>end</span></pre>
|
244
|
+
</td>
|
245
|
+
</tr>
|
246
|
+
</table>
|
247
|
+
</div>
|
248
|
+
|
249
|
+
<div class="method_details ">
|
250
|
+
<p class="signature " id="to_shell_value-instance_method">
|
251
|
+
|
252
|
+
- (<tt>Object</tt>) <strong>to_shell_value</strong>
|
253
|
+
|
254
|
+
|
255
|
+
|
256
|
+
</p><table class="source_code">
|
257
|
+
<tr>
|
258
|
+
<td>
|
259
|
+
<pre class="lines">
|
260
|
+
|
261
|
+
|
262
|
+
15
|
263
|
+
16
|
264
|
+
17
|
265
|
+
18
|
266
|
+
19</pre>
|
267
|
+
</td>
|
268
|
+
<td>
|
269
|
+
<pre class="code"><span class="info file"># File 'lib/sprout/executable/files.rb', line 15</span>
|
270
|
+
|
271
|
+
<span class='kw'>def</span> <span class='id to_shell_value'>to_shell_value</span>
|
272
|
+
<span class='id value'>value</span><span class='period'>.</span><span class='id collect'>collect</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id path'>path</span><span class='op'>|</span>
|
273
|
+
<span class='id clean_path'>clean_path</span> <span class='id path'>path</span>
|
274
|
+
<span class='kw'>end</span>
|
275
|
+
<span class='kw'>end</span></pre>
|
276
|
+
</td>
|
277
|
+
</tr>
|
278
|
+
</table>
|
279
|
+
</div>
|
280
|
+
|
281
|
+
</div>
|
282
|
+
|
283
|
+
</div>
|
284
|
+
|
285
|
+
<div id="footer">
|
286
|
+
Generated on Fri Apr 29 18:33:07 2011 by
|
287
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
288
|
+
0.6.3 (ruby-1.9.2).
|
289
|
+
</div>
|
290
|
+
|
291
|
+
</body>
|
292
|
+
</html>
|
@@ -0,0 +1,141 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
|
+
<head>
|
5
|
+
<meta name="Content-Type" content="text/html; charset=utf-8" />
|
6
|
+
<title>Class: Sprout::Executable::Number</title>
|
7
|
+
<link rel="stylesheet" href="../../css/style.css" type="text/css" media="screen" charset="utf-8" />
|
8
|
+
<link rel="stylesheet" href="../../css/common.css" type="text/css" media="screen" charset="utf-8" />
|
9
|
+
|
10
|
+
<script type="text/javascript" charset="utf-8">
|
11
|
+
relpath = '../..';
|
12
|
+
if (relpath != '') relpath += '/';
|
13
|
+
</script>
|
14
|
+
<script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
|
15
|
+
<script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
|
16
|
+
|
17
|
+
</head>
|
18
|
+
<body>
|
19
|
+
<script type="text/javascript" charset="utf-8">
|
20
|
+
if (window.top.frames.main) document.body.className = 'frames';
|
21
|
+
</script>
|
22
|
+
|
23
|
+
<div id="header">
|
24
|
+
<div id="menu">
|
25
|
+
|
26
|
+
<a href="../../_index.html">Index (N)</a> »
|
27
|
+
<span class='title'><span class='object_link'><a href="../../Sprout.html" title="Sprout (module)">Sprout</a></span></span> » <span class='title'><span class='object_link'><a href="../Executable.html" title="Sprout::Executable (module)">Executable</a></span></span>
|
28
|
+
»
|
29
|
+
<span class="title">Number</span>
|
30
|
+
|
31
|
+
|
32
|
+
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
33
|
+
</div>
|
34
|
+
|
35
|
+
<div id="search">
|
36
|
+
<a id="class_list_link" href="#">Class List</a>
|
37
|
+
<a id="method_list_link" href="#">Method List</a>
|
38
|
+
<a id ="file_list_link" href="#">File List</a>
|
39
|
+
</div>
|
40
|
+
|
41
|
+
<div class="clear"></div>
|
42
|
+
</div>
|
43
|
+
|
44
|
+
<iframe id="search_frame"></iframe>
|
45
|
+
|
46
|
+
<div id="content"><h1>Class: Sprout::Executable::Number
|
47
|
+
|
48
|
+
|
49
|
+
|
50
|
+
</h1>
|
51
|
+
|
52
|
+
<dl class="box">
|
53
|
+
|
54
|
+
<dt class="r1">Inherits:</dt>
|
55
|
+
<dd class="r1">
|
56
|
+
<span class="inheritName"><span class='object_link'><a href="Param.html" title="Sprout::Executable::Param (class)">Param</a></span></span>
|
57
|
+
|
58
|
+
<ul class="fullTree">
|
59
|
+
<li>Object</li>
|
60
|
+
|
61
|
+
<li class="next"><span class='object_link'><a href="Param.html" title="Sprout::Executable::Param (class)">Param</a></span></li>
|
62
|
+
|
63
|
+
<li class="next">Sprout::Executable::Number</li>
|
64
|
+
|
65
|
+
</ul>
|
66
|
+
<a href="#" class="inheritanceTree">show all</a>
|
67
|
+
|
68
|
+
</dd>
|
69
|
+
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
|
74
|
+
|
75
|
+
|
76
|
+
|
77
|
+
|
78
|
+
<dt class="r2 last">Defined in:</dt>
|
79
|
+
<dd class="r2 last">lib/sprout/executable/number.rb</dd>
|
80
|
+
|
81
|
+
</dl>
|
82
|
+
<div class="clear"></div>
|
83
|
+
|
84
|
+
<h2>Overview</h2><div class="docstring">
|
85
|
+
<div class="discussion">
|
86
|
+
|
87
|
+
<p>Concrete Sprout::Executable::Param object for numeric values.</p>
|
88
|
+
|
89
|
+
|
90
|
+
</div>
|
91
|
+
</div>
|
92
|
+
<div class="tags">
|
93
|
+
|
94
|
+
<h3>See Also:</h3>
|
95
|
+
<ul class="see">
|
96
|
+
|
97
|
+
<li><span class='object_link'><a href="Param.html" title="Sprout::Executable::Param (class)">Param</a></span></li>
|
98
|
+
|
99
|
+
</ul>
|
100
|
+
|
101
|
+
</div>
|
102
|
+
<h2>Constant Summary</h2>
|
103
|
+
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
|
110
|
+
<h3 class="inherited">Constants inherited from <span class='object_link'><a href="Param.html" title="Sprout::Executable::Param (class)">Param</a></span></h3>
|
111
|
+
<p class="inherited"><span class='object_link'><a href="Param.html#DEFAULT_DELIMITER-constant" title="Sprout::Executable::Param::DEFAULT_DELIMITER (constant)">DEFAULT_DELIMITER</a></span>, <span class='object_link'><a href="Param.html#DEFAULT_OPTION_PARSER_TYPE_NAME-constant" title="Sprout::Executable::Param::DEFAULT_OPTION_PARSER_TYPE_NAME (constant)">DEFAULT_OPTION_PARSER_TYPE_NAME</a></span>, <span class='object_link'><a href="Param.html#DEFAULT_PREFIX-constant" title="Sprout::Executable::Param::DEFAULT_PREFIX (constant)">DEFAULT_PREFIX</a></span>, <span class='object_link'><a href="Param.html#DEFAULT_SHORT_PREFIX-constant" title="Sprout::Executable::Param::DEFAULT_SHORT_PREFIX (constant)">DEFAULT_SHORT_PREFIX</a></span></p>
|
112
|
+
|
113
|
+
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
|
120
|
+
<h2>Method Summary</h2>
|
121
|
+
|
122
|
+
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="Param.html" title="Sprout::Executable::Param (class)">Param</a></span></h3>
|
123
|
+
<p class="inherited"><span class='object_link'><a href="Param.html#clean_path-instance_method" title="Sprout::Executable::Param#clean_path (method)">#clean_path</a></span>, <span class='object_link'><a href="Param.html#default-instance_method" title="Sprout::Executable::Param#default (method)">#default</a></span>, <span class='object_link'><a href="Param.html#default%3D-instance_method" title="Sprout::Executable::Param#default= (method)">#default=</a></span>, <span class='object_link'><a href="Param.html#default_option_parser_declaration-instance_method" title="Sprout::Executable::Param#default_option_parser_declaration (method)">#default_option_parser_declaration</a></span>, <span class='object_link'><a href="Param.html#file_is_output%3F-instance_method" title="Sprout::Executable::Param#file_is_output? (method)">#file_is_output?</a></span>, <span class='object_link'><a href="Param.html#hidden_name%3F-instance_method" title="Sprout::Executable::Param#hidden_name? (method)">#hidden_name?</a></span>, <span class='object_link'><a href="Param.html#hidden_value%3F-instance_method" title="Sprout::Executable::Param#hidden_value? (method)">#hidden_value?</a></span>, <span class='object_link'><a href="Param.html#initialize-instance_method" title="Sprout::Executable::Param#initialize (method)">#initialize</a></span>, <span class='object_link'><a href="Param.html#option_parser_declaration-instance_method" title="Sprout::Executable::Param#option_parser_declaration (method)">#option_parser_declaration</a></span>, <span class='object_link'><a href="Param.html#option_parser_name-instance_method" title="Sprout::Executable::Param#option_parser_name (method)">#option_parser_name</a></span>, <span class='object_link'><a href="Param.html#option_parser_short_name-instance_method" title="Sprout::Executable::Param#option_parser_short_name (method)">#option_parser_short_name</a></span>, <span class='object_link'><a href="Param.html#option_parser_type_name-instance_method" title="Sprout::Executable::Param#option_parser_type_name (method)">#option_parser_type_name</a></span>, <span class='object_link'><a href="Param.html#option_parser_type_output-instance_method" title="Sprout::Executable::Param#option_parser_type_output (method)">#option_parser_type_output</a></span>, <span class='object_link'><a href="Param.html#prepare-instance_method" title="Sprout::Executable::Param#prepare (method)">#prepare</a></span>, <span class='object_link'><a href="Param.html#prepare_prerequisites-instance_method" title="Sprout::Executable::Param#prepare_prerequisites (method)">#prepare_prerequisites</a></span>, <span class='object_link'><a href="Param.html#prepared%3F-instance_method" title="Sprout::Executable::Param#prepared? (method)">#prepared?</a></span>, <span class='object_link'><a href="Param.html#required%3F-instance_method" title="Sprout::Executable::Param#required? (method)">#required?</a></span>, <span class='object_link'><a href="Param.html#shell_value-instance_method" title="Sprout::Executable::Param#shell_value (method)">#shell_value</a></span>, <span class='object_link'><a href="Param.html#short_prefix-instance_method" title="Sprout::Executable::Param#short_prefix (method)">#short_prefix</a></span>, <span class='object_link'><a href="Param.html#to_rdoc-instance_method" title="Sprout::Executable::Param#to_rdoc (method)">#to_rdoc</a></span>, <span class='object_link'><a href="Param.html#to_shell-instance_method" title="Sprout::Executable::Param#to_shell (method)">#to_shell</a></span>, <span class='object_link'><a href="Param.html#validate-instance_method" title="Sprout::Executable::Param#validate (method)">#validate</a></span>, <span class='object_link'><a href="Param.html#visible%3F-instance_method" title="Sprout::Executable::Param#visible? (method)">#visible?</a></span></p>
|
124
|
+
<div id="constructor_details" class="method_details_list">
|
125
|
+
<h2>Constructor Details</h2>
|
126
|
+
|
127
|
+
<p class="notice">This class inherits a constructor from <span class='object_link'><a href="Param.html#initialize-instance_method" title="Sprout::Executable::Param#initialize (method)">Sprout::Executable::Param</a></span></p>
|
128
|
+
|
129
|
+
</div>
|
130
|
+
|
131
|
+
|
132
|
+
</div>
|
133
|
+
|
134
|
+
<div id="footer">
|
135
|
+
Generated on Fri Apr 29 18:33:08 2011 by
|
136
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
137
|
+
0.6.3 (ruby-1.9.2).
|
138
|
+
</div>
|
139
|
+
|
140
|
+
</body>
|
141
|
+
</html>
|
@@ -0,0 +1,2874 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
|
+
<head>
|
5
|
+
<meta name="Content-Type" content="text/html; charset=utf-8" />
|
6
|
+
<title>Class: Sprout::Executable::Param</title>
|
7
|
+
<link rel="stylesheet" href="../../css/style.css" type="text/css" media="screen" charset="utf-8" />
|
8
|
+
<link rel="stylesheet" href="../../css/common.css" type="text/css" media="screen" charset="utf-8" />
|
9
|
+
|
10
|
+
<script type="text/javascript" charset="utf-8">
|
11
|
+
relpath = '../..';
|
12
|
+
if (relpath != '') relpath += '/';
|
13
|
+
</script>
|
14
|
+
<script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
|
15
|
+
<script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
|
16
|
+
|
17
|
+
</head>
|
18
|
+
<body>
|
19
|
+
<script type="text/javascript" charset="utf-8">
|
20
|
+
if (window.top.frames.main) document.body.className = 'frames';
|
21
|
+
</script>
|
22
|
+
|
23
|
+
<div id="header">
|
24
|
+
<div id="menu">
|
25
|
+
|
26
|
+
<a href="../../_index.html">Index (P)</a> »
|
27
|
+
<span class='title'><span class='object_link'><a href="../../Sprout.html" title="Sprout (module)">Sprout</a></span></span> » <span class='title'><span class='object_link'><a href="../Executable.html" title="Sprout::Executable (module)">Executable</a></span></span>
|
28
|
+
»
|
29
|
+
<span class="title">Param</span>
|
30
|
+
|
31
|
+
|
32
|
+
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
33
|
+
</div>
|
34
|
+
|
35
|
+
<div id="search">
|
36
|
+
<a id="class_list_link" href="#">Class List</a>
|
37
|
+
<a id="method_list_link" href="#">Method List</a>
|
38
|
+
<a id ="file_list_link" href="#">File List</a>
|
39
|
+
</div>
|
40
|
+
|
41
|
+
<div class="clear"></div>
|
42
|
+
</div>
|
43
|
+
|
44
|
+
<iframe id="search_frame"></iframe>
|
45
|
+
|
46
|
+
<div id="content"><h1>Class: Sprout::Executable::Param
|
47
|
+
|
48
|
+
|
49
|
+
|
50
|
+
</h1>
|
51
|
+
|
52
|
+
<dl class="box">
|
53
|
+
|
54
|
+
<dt class="r1">Inherits:</dt>
|
55
|
+
<dd class="r1">
|
56
|
+
<span class="inheritName">Object</span>
|
57
|
+
|
58
|
+
<ul class="fullTree">
|
59
|
+
<li>Object</li>
|
60
|
+
|
61
|
+
<li class="next">Sprout::Executable::Param</li>
|
62
|
+
|
63
|
+
</ul>
|
64
|
+
<a href="#" class="inheritanceTree">show all</a>
|
65
|
+
|
66
|
+
</dd>
|
67
|
+
|
68
|
+
|
69
|
+
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
|
74
|
+
|
75
|
+
|
76
|
+
<dt class="r2 last">Defined in:</dt>
|
77
|
+
<dd class="r2 last">lib/sprout/executable/param.rb</dd>
|
78
|
+
|
79
|
+
</dl>
|
80
|
+
<div class="clear"></div>
|
81
|
+
|
82
|
+
<h2>Overview</h2><div class="docstring">
|
83
|
+
<div class="discussion">
|
84
|
+
|
85
|
+
<p>The abstract base class for all Executable parameters.</p>
|
86
|
+
|
87
|
+
<p>This class provides a variety of template methods and general functionality
|
88
|
+
to the different executable parameter types.</p>
|
89
|
+
|
90
|
+
<p>Many of these parameter attributes are exposed to Sprout::Executable
|
91
|
+
concrete classes as the options hash like:</p>
|
92
|
+
|
93
|
+
<pre class="code"><span class='kw'>class</span> <span class='const'>Foo</span>
|
94
|
+
<span class='id include'>include</span> <span class='const'>Sprout</span><span class='op'>::</span><span class='const'>Executable</span>
|
95
|
+
|
96
|
+
<span class='id add_param'>add_param</span> <span class='symbol'>:name</span><span class='comma'>,</span> <span class='const'>String</span><span class='comma'>,</span> <span class='symbol'>:hidden_name</span> <span class='op'>=></span> <span class='kw'>true</span>
|
97
|
+
<span class='kw'>end</span></pre>
|
98
|
+
|
99
|
+
|
100
|
+
</div>
|
101
|
+
</div>
|
102
|
+
<div class="tags">
|
103
|
+
|
104
|
+
<h3>See Also:</h3>
|
105
|
+
<ul class="see">
|
106
|
+
|
107
|
+
<li><span class='object_link'><a href="Boolean.html" title="Sprout::Executable::Boolean (class)">Boolean</a></span></li>
|
108
|
+
|
109
|
+
<li><span class='object_link'><a href="FileParam.html" title="Sprout::Executable::FileParam (class)">FileParam</a></span></li>
|
110
|
+
|
111
|
+
<li><span class='object_link'><a href="Files.html" title="Sprout::Executable::Files (class)">Files</a></span></li>
|
112
|
+
|
113
|
+
<li><span class='object_link'><a href="Number.html" title="Sprout::Executable::Number (class)">Number</a></span></li>
|
114
|
+
|
115
|
+
<li><span class='object_link'><a href="ParameterFactory.html" title="Sprout::Executable::ParameterFactory (class)">ParameterFactory</a></span></li>
|
116
|
+
|
117
|
+
<li><span class='object_link'><a href="Path.html" title="Sprout::Executable::Path (class)">Path</a></span></li>
|
118
|
+
|
119
|
+
<li><span class='object_link'><a href="Paths.html" title="Sprout::Executable::Paths (class)">Paths</a></span></li>
|
120
|
+
|
121
|
+
<li><span class='object_link'><a href="StringParam.html" title="Sprout::Executable::StringParam (class)">StringParam</a></span></li>
|
122
|
+
|
123
|
+
<li><span class='object_link'><a href="Strings.html" title="Sprout::Executable::Strings (class)">Strings</a></span></li>
|
124
|
+
|
125
|
+
<li><span class='object_link'><a href="Url.html" title="Sprout::Executable::Url (class)">Url</a></span></li>
|
126
|
+
|
127
|
+
<li><span class='object_link'><a href="Urls.html" title="Sprout::Executable::Urls (class)">Urls</a></span></li>
|
128
|
+
|
129
|
+
</ul>
|
130
|
+
|
131
|
+
</div><div id="subclasses">
|
132
|
+
<h2>Direct Known Subclasses</h2>
|
133
|
+
<p class="children"><span class='object_link'><a href="Boolean.html" title="Sprout::Executable::Boolean (class)">Boolean</a></span>, <span class='object_link'><a href="FileParam.html" title="Sprout::Executable::FileParam (class)">FileParam</a></span>, <span class='object_link'><a href="Files.html" title="Sprout::Executable::Files (class)">Files</a></span>, <span class='object_link'><a href="Number.html" title="Sprout::Executable::Number (class)">Number</a></span>, <span class='object_link'><a href="Path.html" title="Sprout::Executable::Path (class)">Path</a></span>, <span class='object_link'><a href="StringParam.html" title="Sprout::Executable::StringParam (class)">StringParam</a></span>, <span class='object_link'><a href="Strings.html" title="Sprout::Executable::Strings (class)">Strings</a></span></p>
|
134
|
+
</div>
|
135
|
+
|
136
|
+
<h2>Constant Summary</h2>
|
137
|
+
|
138
|
+
<dl class="constants">
|
139
|
+
|
140
|
+
<dt id="DEFAULT_DELIMITER-constant" class="">DEFAULT_DELIMITER =
|
141
|
+
<div class="docstring">
|
142
|
+
<div class="discussion">
|
143
|
+
|
144
|
+
<p>Default value for the delimiter that will separate parameter names from
|
145
|
+
their values.</p>
|
146
|
+
|
147
|
+
|
148
|
+
</div>
|
149
|
+
</div>
|
150
|
+
<div class="tags">
|
151
|
+
|
152
|
+
</div>
|
153
|
+
</dt>
|
154
|
+
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>=</span><span class='tstring_end'>'</span></span></pre></dd>
|
155
|
+
|
156
|
+
<dt id="DEFAULT_OPTION_PARSER_TYPE_NAME-constant" class="">DEFAULT_OPTION_PARSER_TYPE_NAME =
|
157
|
+
<div class="docstring">
|
158
|
+
<div class="discussion">
|
159
|
+
|
160
|
+
<p>Defaut TYPE assumed for parameters when creating documentation for the
|
161
|
+
OptionParser.</p>
|
162
|
+
|
163
|
+
|
164
|
+
</div>
|
165
|
+
</div>
|
166
|
+
<div class="tags">
|
167
|
+
|
168
|
+
</div>
|
169
|
+
</dt>
|
170
|
+
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>STRING</span><span class='tstring_end'>'</span></span></pre></dd>
|
171
|
+
|
172
|
+
<dt id="DEFAULT_PREFIX-constant" class="">DEFAULT_PREFIX =
|
173
|
+
<div class="docstring">
|
174
|
+
<div class="discussion">
|
175
|
+
|
176
|
+
<p>Default value for the parameter prefix. Should usually be pulled from the
|
177
|
+
<tt>belongs_to</tt> Sprout::Executable.</p>
|
178
|
+
|
179
|
+
|
180
|
+
</div>
|
181
|
+
</div>
|
182
|
+
<div class="tags">
|
183
|
+
|
184
|
+
</div>
|
185
|
+
</dt>
|
186
|
+
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>--</span><span class='tstring_end'>'</span></span></pre></dd>
|
187
|
+
|
188
|
+
<dt id="DEFAULT_SHORT_PREFIX-constant" class="">DEFAULT_SHORT_PREFIX =
|
189
|
+
<div class="docstring">
|
190
|
+
<div class="discussion">
|
191
|
+
|
192
|
+
<p>Default prefix for truncated parameters. Should usually be pulled from the
|
193
|
+
<tt>belongs_to</tt> Sprout::Executable.</p>
|
194
|
+
|
195
|
+
|
196
|
+
</div>
|
197
|
+
</div>
|
198
|
+
<div class="tags">
|
199
|
+
|
200
|
+
</div>
|
201
|
+
</dt>
|
202
|
+
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>-</span><span class='tstring_end'>'</span></span></pre></dd>
|
203
|
+
|
204
|
+
</dl>
|
205
|
+
|
206
|
+
|
207
|
+
|
208
|
+
<h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
|
209
|
+
<ul class="summary">
|
210
|
+
|
211
|
+
<li class="public ">
|
212
|
+
<span class="summary_signature">
|
213
|
+
|
214
|
+
<a href="#belongs_to-instance_method" title="#belongs_to (instance method)">- (Object) <strong>belongs_to</strong> </a>
|
215
|
+
|
216
|
+
|
217
|
+
|
218
|
+
</span>
|
219
|
+
|
220
|
+
|
221
|
+
|
222
|
+
|
223
|
+
|
224
|
+
|
225
|
+
|
226
|
+
|
227
|
+
|
228
|
+
|
229
|
+
|
230
|
+
<span class="summary_desc"><div class='inline'>
|
231
|
+
<p>The Sprout::Executable that this parameter instance belongs to.</p>
|
232
|
+
</div></span>
|
233
|
+
|
234
|
+
</li>
|
235
|
+
|
236
|
+
|
237
|
+
<li class="public ">
|
238
|
+
<span class="summary_signature">
|
239
|
+
|
240
|
+
<a href="#delimiter-instance_method" title="#delimiter (instance method)">- (Object) <strong>delimiter</strong> </a>
|
241
|
+
|
242
|
+
|
243
|
+
|
244
|
+
</span>
|
245
|
+
|
246
|
+
|
247
|
+
|
248
|
+
|
249
|
+
|
250
|
+
|
251
|
+
|
252
|
+
|
253
|
+
|
254
|
+
|
255
|
+
|
256
|
+
<span class="summary_desc"><div class='inline'>
|
257
|
+
<p>Executable::Params join their name/value pair with an equals sign by
|
258
|
+
default, this can be modified To a space or whatever you wish.</p>
|
259
|
+
</div></span>
|
260
|
+
|
261
|
+
</li>
|
262
|
+
|
263
|
+
|
264
|
+
<li class="public ">
|
265
|
+
<span class="summary_signature">
|
266
|
+
|
267
|
+
<a href="#description-instance_method" title="#description (instance method)">- (Object) <strong>description</strong> </a>
|
268
|
+
|
269
|
+
|
270
|
+
|
271
|
+
</span>
|
272
|
+
|
273
|
+
|
274
|
+
|
275
|
+
|
276
|
+
|
277
|
+
|
278
|
+
|
279
|
+
|
280
|
+
|
281
|
+
|
282
|
+
|
283
|
+
<span class="summary_desc"><div class='inline'>
|
284
|
+
<p>The String description that will be used for RDoc documentation and user
|
285
|
+
help.</p>
|
286
|
+
</div></span>
|
287
|
+
|
288
|
+
</li>
|
289
|
+
|
290
|
+
|
291
|
+
<li class="public ">
|
292
|
+
<span class="summary_signature">
|
293
|
+
|
294
|
+
<a href="#file_expression-instance_method" title="#file_expression (instance method)">- (Object) <strong>file_expression</strong> </a>
|
295
|
+
|
296
|
+
|
297
|
+
|
298
|
+
</span>
|
299
|
+
|
300
|
+
|
301
|
+
|
302
|
+
|
303
|
+
|
304
|
+
|
305
|
+
|
306
|
+
|
307
|
+
|
308
|
+
|
309
|
+
|
310
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
311
|
+
|
312
|
+
</li>
|
313
|
+
|
314
|
+
|
315
|
+
<li class="public ">
|
316
|
+
<span class="summary_signature">
|
317
|
+
|
318
|
+
<a href="#hidden_name-instance_method" title="#hidden_name (instance method)">- (Object) <strong>hidden_name</strong> </a>
|
319
|
+
|
320
|
+
|
321
|
+
|
322
|
+
</span>
|
323
|
+
|
324
|
+
|
325
|
+
|
326
|
+
|
327
|
+
|
328
|
+
|
329
|
+
|
330
|
+
|
331
|
+
|
332
|
+
|
333
|
+
|
334
|
+
<span class="summary_desc"><div class='inline'>
|
335
|
+
<p>Boolean value that hides the name parameter from the shell execution.</p>
|
336
|
+
</div></span>
|
337
|
+
|
338
|
+
</li>
|
339
|
+
|
340
|
+
|
341
|
+
<li class="public ">
|
342
|
+
<span class="summary_signature">
|
343
|
+
|
344
|
+
<a href="#hidden_value-instance_method" title="#hidden_value (instance method)">- (Object) <strong>hidden_value</strong> </a>
|
345
|
+
|
346
|
+
|
347
|
+
|
348
|
+
</span>
|
349
|
+
|
350
|
+
|
351
|
+
|
352
|
+
|
353
|
+
|
354
|
+
|
355
|
+
|
356
|
+
|
357
|
+
|
358
|
+
|
359
|
+
|
360
|
+
<span class="summary_desc"><div class='inline'>
|
361
|
+
<p>Boolean value that hides the value parameter from the shell execution.</p>
|
362
|
+
</div></span>
|
363
|
+
|
364
|
+
</li>
|
365
|
+
|
366
|
+
|
367
|
+
<li class="public ">
|
368
|
+
<span class="summary_signature">
|
369
|
+
|
370
|
+
<a href="#name-instance_method" title="#name (instance method)">- (Object) <strong>name</strong> </a>
|
371
|
+
|
372
|
+
|
373
|
+
|
374
|
+
</span>
|
375
|
+
|
376
|
+
|
377
|
+
|
378
|
+
|
379
|
+
|
380
|
+
|
381
|
+
|
382
|
+
|
383
|
+
|
384
|
+
|
385
|
+
|
386
|
+
<span class="summary_desc"><div class='inline'>
|
387
|
+
<p>The String (or Symbol) name of the parameter.</p>
|
388
|
+
</div></span>
|
389
|
+
|
390
|
+
</li>
|
391
|
+
|
392
|
+
|
393
|
+
<li class="public ">
|
394
|
+
<span class="summary_signature">
|
395
|
+
|
396
|
+
<a href="#prefix-instance_method" title="#prefix (instance method)">- (Object) <strong>prefix</strong> </a>
|
397
|
+
|
398
|
+
|
399
|
+
|
400
|
+
</span>
|
401
|
+
|
402
|
+
|
403
|
+
|
404
|
+
|
405
|
+
|
406
|
+
|
407
|
+
|
408
|
+
|
409
|
+
|
410
|
+
|
411
|
+
|
412
|
+
<span class="summary_desc"><div class='inline'>
|
413
|
+
<p>Leading character for each parameter Can sometimes be an empty string,
|
414
|
+
other times it's a double dash '--' but usually it's just a single dash
|
415
|
+
'-'.</p>
|
416
|
+
</div></span>
|
417
|
+
|
418
|
+
</li>
|
419
|
+
|
420
|
+
|
421
|
+
<li class="public ">
|
422
|
+
<span class="summary_signature">
|
423
|
+
|
424
|
+
<a href="#reader-instance_method" title="#reader (instance method)">- (Object) <strong>reader</strong> </a>
|
425
|
+
|
426
|
+
|
427
|
+
|
428
|
+
</span>
|
429
|
+
|
430
|
+
|
431
|
+
|
432
|
+
|
433
|
+
|
434
|
+
|
435
|
+
|
436
|
+
|
437
|
+
|
438
|
+
|
439
|
+
|
440
|
+
<span class="summary_desc"><div class='inline'>
|
441
|
+
<p>A Symbol that refers to a method that will return the expected value when
|
442
|
+
called.</p>
|
443
|
+
</div></span>
|
444
|
+
|
445
|
+
</li>
|
446
|
+
|
447
|
+
|
448
|
+
<li class="public ">
|
449
|
+
<span class="summary_signature">
|
450
|
+
|
451
|
+
<a href="#required-instance_method" title="#required (instance method)">- (Object) <strong>required</strong> </a>
|
452
|
+
|
453
|
+
|
454
|
+
|
455
|
+
</span>
|
456
|
+
|
457
|
+
|
458
|
+
|
459
|
+
|
460
|
+
|
461
|
+
|
462
|
+
|
463
|
+
|
464
|
+
|
465
|
+
|
466
|
+
|
467
|
+
<span class="summary_desc"><div class='inline'>
|
468
|
+
<p>Boolean value that will cause a Sprout::Errors::UsageError if the
|
469
|
+
executable is invoked without this parameter first being set.</p>
|
470
|
+
</div></span>
|
471
|
+
|
472
|
+
</li>
|
473
|
+
|
474
|
+
|
475
|
+
<li class="public ">
|
476
|
+
<span class="summary_signature">
|
477
|
+
|
478
|
+
<a href="#shell_name-instance_method" title="#shell_name (instance method)">- (Object) <strong>shell_name</strong> </a>
|
479
|
+
|
480
|
+
|
481
|
+
|
482
|
+
</span>
|
483
|
+
|
484
|
+
|
485
|
+
|
486
|
+
|
487
|
+
|
488
|
+
|
489
|
+
|
490
|
+
|
491
|
+
|
492
|
+
|
493
|
+
|
494
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
495
|
+
|
496
|
+
</li>
|
497
|
+
|
498
|
+
|
499
|
+
<li class="public ">
|
500
|
+
<span class="summary_signature">
|
501
|
+
|
502
|
+
<a href="#short_name-instance_method" title="#short_name (instance method)">- (Object) <strong>short_name</strong> </a>
|
503
|
+
|
504
|
+
|
505
|
+
|
506
|
+
</span>
|
507
|
+
|
508
|
+
|
509
|
+
|
510
|
+
|
511
|
+
|
512
|
+
|
513
|
+
|
514
|
+
|
515
|
+
|
516
|
+
|
517
|
+
|
518
|
+
<span class="summary_desc"><div class='inline'>
|
519
|
+
<p>The short name for this parameter.</p>
|
520
|
+
</div></span>
|
521
|
+
|
522
|
+
</li>
|
523
|
+
|
524
|
+
|
525
|
+
<li class="public ">
|
526
|
+
<span class="summary_signature">
|
527
|
+
|
528
|
+
<a href="#to_shell_proc-instance_method" title="#to_shell_proc (instance method)">- (Object) <strong>to_shell_proc</strong> </a>
|
529
|
+
|
530
|
+
|
531
|
+
|
532
|
+
</span>
|
533
|
+
|
534
|
+
|
535
|
+
|
536
|
+
|
537
|
+
|
538
|
+
|
539
|
+
|
540
|
+
|
541
|
+
|
542
|
+
|
543
|
+
|
544
|
+
<span class="summary_desc"><div class='inline'>
|
545
|
+
<p>An optional Proc that should be called when this parameter is serialized to
|
546
|
+
shell output.</p>
|
547
|
+
</div></span>
|
548
|
+
|
549
|
+
</li>
|
550
|
+
|
551
|
+
|
552
|
+
<li class="public ">
|
553
|
+
<span class="summary_signature">
|
554
|
+
|
555
|
+
<a href="#type-instance_method" title="#type (instance method)">- (Object) <strong>type</strong> </a>
|
556
|
+
|
557
|
+
|
558
|
+
|
559
|
+
</span>
|
560
|
+
|
561
|
+
|
562
|
+
|
563
|
+
|
564
|
+
|
565
|
+
|
566
|
+
|
567
|
+
|
568
|
+
|
569
|
+
|
570
|
+
|
571
|
+
<span class="summary_desc"><div class='inline'>
|
572
|
+
<p>The data type of the parameter, used to generate more appropriate RDoc
|
573
|
+
content for the concrete Sprout::Executable.</p>
|
574
|
+
</div></span>
|
575
|
+
|
576
|
+
</li>
|
577
|
+
|
578
|
+
|
579
|
+
<li class="public ">
|
580
|
+
<span class="summary_signature">
|
581
|
+
|
582
|
+
<a href="#value-instance_method" title="#value (instance method)">- (Object) <strong>value</strong> </a>
|
583
|
+
|
584
|
+
|
585
|
+
|
586
|
+
</span>
|
587
|
+
|
588
|
+
|
589
|
+
|
590
|
+
|
591
|
+
|
592
|
+
|
593
|
+
|
594
|
+
|
595
|
+
|
596
|
+
|
597
|
+
|
598
|
+
<span class="summary_desc"><div class='inline'>
|
599
|
+
<p>The value that was assigned to this parameter when the concrete
|
600
|
+
Sprout::Executable was instantiated and configured.</p>
|
601
|
+
</div></span>
|
602
|
+
|
603
|
+
</li>
|
604
|
+
|
605
|
+
|
606
|
+
<li class="public ">
|
607
|
+
<span class="summary_signature">
|
608
|
+
|
609
|
+
<a href="#writer-instance_method" title="#writer (instance method)">- (Object) <strong>writer</strong> </a>
|
610
|
+
|
611
|
+
|
612
|
+
|
613
|
+
</span>
|
614
|
+
|
615
|
+
|
616
|
+
|
617
|
+
|
618
|
+
|
619
|
+
|
620
|
+
|
621
|
+
|
622
|
+
|
623
|
+
|
624
|
+
|
625
|
+
<span class="summary_desc"><div class='inline'>
|
626
|
+
<p>A Symbol that refers to a method (not accessor) that will be called when
|
627
|
+
the value is set.</p>
|
628
|
+
</div></span>
|
629
|
+
|
630
|
+
</li>
|
631
|
+
|
632
|
+
|
633
|
+
</ul>
|
634
|
+
|
635
|
+
|
636
|
+
|
637
|
+
<h2>
|
638
|
+
Instance Method Summary
|
639
|
+
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
640
|
+
</h2>
|
641
|
+
|
642
|
+
<ul class="summary">
|
643
|
+
|
644
|
+
<li class="protected ">
|
645
|
+
<span class="summary_signature">
|
646
|
+
|
647
|
+
<a href="#clean_path-instance_method" title="#clean_path (instance method)">- (Object) <strong>clean_path</strong>(path) </a>
|
648
|
+
|
649
|
+
|
650
|
+
|
651
|
+
</span>
|
652
|
+
|
653
|
+
|
654
|
+
<span class="note title protected">protected</span>
|
655
|
+
|
656
|
+
|
657
|
+
|
658
|
+
|
659
|
+
|
660
|
+
<span class="summary_desc"><div class='inline'>
|
661
|
+
<p>Clean the provided path using the current Sprout::System.</p>
|
662
|
+
</div></span>
|
663
|
+
|
664
|
+
</li>
|
665
|
+
|
666
|
+
|
667
|
+
<li class="public ">
|
668
|
+
<span class="summary_signature">
|
669
|
+
|
670
|
+
<a href="#default-instance_method" title="#default (instance method)">- (Object) <strong>default</strong> </a>
|
671
|
+
|
672
|
+
|
673
|
+
|
674
|
+
</span>
|
675
|
+
|
676
|
+
|
677
|
+
|
678
|
+
|
679
|
+
|
680
|
+
|
681
|
+
|
682
|
+
|
683
|
+
<span class="summary_desc"><div class='inline'>
|
684
|
+
<p>Return the default value or nil if none was provided.</p>
|
685
|
+
</div></span>
|
686
|
+
|
687
|
+
</li>
|
688
|
+
|
689
|
+
|
690
|
+
<li class="public ">
|
691
|
+
<span class="summary_signature">
|
692
|
+
|
693
|
+
<a href="#default%3D-instance_method" title="#default= (instance method)">- (Object) <strong>default=</strong>(value) </a>
|
694
|
+
|
695
|
+
|
696
|
+
|
697
|
+
</span>
|
698
|
+
|
699
|
+
|
700
|
+
|
701
|
+
|
702
|
+
|
703
|
+
|
704
|
+
|
705
|
+
|
706
|
+
<span class="summary_desc"><div class='inline'>
|
707
|
+
<p>Set the default value of the parameter.</p>
|
708
|
+
</div></span>
|
709
|
+
|
710
|
+
</li>
|
711
|
+
|
712
|
+
|
713
|
+
<li class="public ">
|
714
|
+
<span class="summary_signature">
|
715
|
+
|
716
|
+
<a href="#default_option_parser_declaration-instance_method" title="#default_option_parser_declaration (instance method)">- (Object) <strong>default_option_parser_declaration</strong> </a>
|
717
|
+
|
718
|
+
|
719
|
+
|
720
|
+
</span>
|
721
|
+
|
722
|
+
|
723
|
+
|
724
|
+
|
725
|
+
|
726
|
+
|
727
|
+
|
728
|
+
|
729
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
730
|
+
|
731
|
+
</li>
|
732
|
+
|
733
|
+
|
734
|
+
<li class="protected ">
|
735
|
+
<span class="summary_signature">
|
736
|
+
|
737
|
+
<a href="#file_is_output%3F-instance_method" title="#file_is_output? (instance method)">- (Boolean) <strong>file_is_output?</strong>(file) </a>
|
738
|
+
|
739
|
+
|
740
|
+
|
741
|
+
</span>
|
742
|
+
|
743
|
+
|
744
|
+
<span class="note title protected">protected</span>
|
745
|
+
|
746
|
+
|
747
|
+
|
748
|
+
|
749
|
+
|
750
|
+
<span class="summary_desc"><div class='inline'>
|
751
|
+
<p>Return true if the Sprout::Executable that this parameter
|
752
|
+
<tt>belongs_to</tt> has an <tt>output</tt> method (or parameter), and if
|
753
|
+
the provided <tt>file</tt> matches the value of that parameter.</p>
|
754
|
+
</div></span>
|
755
|
+
|
756
|
+
</li>
|
757
|
+
|
758
|
+
|
759
|
+
<li class="public ">
|
760
|
+
<span class="summary_signature">
|
761
|
+
|
762
|
+
<a href="#hidden_name%3F-instance_method" title="#hidden_name? (instance method)">- (Boolean) <strong>hidden_name?</strong> </a>
|
763
|
+
|
764
|
+
|
765
|
+
|
766
|
+
</span>
|
767
|
+
|
768
|
+
|
769
|
+
|
770
|
+
|
771
|
+
|
772
|
+
|
773
|
+
|
774
|
+
|
775
|
+
<span class="summary_desc"><div class='inline'>
|
776
|
+
<p>Should the param name be hidden from the shell? Used for params like
|
777
|
+
'input' on mxmlc.</p>
|
778
|
+
</div></span>
|
779
|
+
|
780
|
+
</li>
|
781
|
+
|
782
|
+
|
783
|
+
<li class="public ">
|
784
|
+
<span class="summary_signature">
|
785
|
+
|
786
|
+
<a href="#hidden_value%3F-instance_method" title="#hidden_value? (instance method)">- (Boolean) <strong>hidden_value?</strong> </a>
|
787
|
+
|
788
|
+
|
789
|
+
|
790
|
+
</span>
|
791
|
+
|
792
|
+
|
793
|
+
|
794
|
+
|
795
|
+
|
796
|
+
|
797
|
+
|
798
|
+
|
799
|
+
<span class="summary_desc"><div class='inline'>
|
800
|
+
<p>Should the param value be hidden from the shell? Usually used for Boolean
|
801
|
+
toggles like '-debug'.</p>
|
802
|
+
</div></span>
|
803
|
+
|
804
|
+
</li>
|
805
|
+
|
806
|
+
|
807
|
+
<li class="public ">
|
808
|
+
<span class="summary_signature">
|
809
|
+
|
810
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">- (Param) <strong>initialize</strong> </a>
|
811
|
+
|
812
|
+
|
813
|
+
|
814
|
+
</span>
|
815
|
+
|
816
|
+
<span class="note title constructor">constructor</span>
|
817
|
+
|
818
|
+
|
819
|
+
|
820
|
+
|
821
|
+
|
822
|
+
|
823
|
+
|
824
|
+
|
825
|
+
<span class="summary_desc"><div class='inline'>
|
826
|
+
<p>Default constructor for Params, if you create a new concrete type, be sure
|
827
|
+
to call <tt>super()</tt> in your own constructor.</p>
|
828
|
+
</div></span>
|
829
|
+
|
830
|
+
</li>
|
831
|
+
|
832
|
+
|
833
|
+
<li class="public ">
|
834
|
+
<span class="summary_signature">
|
835
|
+
|
836
|
+
<a href="#option_parser_declaration-instance_method" title="#option_parser_declaration (instance method)">- (Object) <strong>option_parser_declaration</strong> </a>
|
837
|
+
|
838
|
+
|
839
|
+
|
840
|
+
</span>
|
841
|
+
|
842
|
+
|
843
|
+
|
844
|
+
|
845
|
+
|
846
|
+
|
847
|
+
|
848
|
+
|
849
|
+
<span class="summary_desc"><div class='inline'>
|
850
|
+
<p>How this parameter is provided to the Ruby OptionParser when being exposed
|
851
|
+
as a Ruby Executable.</p>
|
852
|
+
</div></span>
|
853
|
+
|
854
|
+
</li>
|
855
|
+
|
856
|
+
|
857
|
+
<li class="protected ">
|
858
|
+
<span class="summary_signature">
|
859
|
+
|
860
|
+
<a href="#option_parser_name-instance_method" title="#option_parser_name (instance method)">- (Object) <strong>option_parser_name</strong> </a>
|
861
|
+
|
862
|
+
|
863
|
+
|
864
|
+
</span>
|
865
|
+
|
866
|
+
|
867
|
+
<span class="note title protected">protected</span>
|
868
|
+
|
869
|
+
|
870
|
+
|
871
|
+
|
872
|
+
|
873
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
874
|
+
|
875
|
+
</li>
|
876
|
+
|
877
|
+
|
878
|
+
<li class="public ">
|
879
|
+
<span class="summary_signature">
|
880
|
+
|
881
|
+
<a href="#option_parser_short_name-instance_method" title="#option_parser_short_name (instance method)">- (Object) <strong>option_parser_short_name</strong> </a>
|
882
|
+
|
883
|
+
|
884
|
+
|
885
|
+
</span>
|
886
|
+
|
887
|
+
|
888
|
+
|
889
|
+
|
890
|
+
|
891
|
+
|
892
|
+
|
893
|
+
|
894
|
+
<span class="summary_desc"><div class='inline'>
|
895
|
+
<p>The Ruby OptionParser short name with prefix.</p>
|
896
|
+
</div></span>
|
897
|
+
|
898
|
+
</li>
|
899
|
+
|
900
|
+
|
901
|
+
<li class="protected ">
|
902
|
+
<span class="summary_signature">
|
903
|
+
|
904
|
+
<a href="#option_parser_type_name-instance_method" title="#option_parser_type_name (instance method)">- (Object) <strong>option_parser_type_name</strong> </a>
|
905
|
+
|
906
|
+
|
907
|
+
|
908
|
+
</span>
|
909
|
+
|
910
|
+
|
911
|
+
<span class="note title protected">protected</span>
|
912
|
+
|
913
|
+
|
914
|
+
|
915
|
+
|
916
|
+
|
917
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
918
|
+
|
919
|
+
</li>
|
920
|
+
|
921
|
+
|
922
|
+
<li class="protected ">
|
923
|
+
<span class="summary_signature">
|
924
|
+
|
925
|
+
<a href="#option_parser_type_output-instance_method" title="#option_parser_type_output (instance method)">- (Object) <strong>option_parser_type_output</strong> </a>
|
926
|
+
|
927
|
+
|
928
|
+
|
929
|
+
</span>
|
930
|
+
|
931
|
+
|
932
|
+
<span class="note title protected">protected</span>
|
933
|
+
|
934
|
+
|
935
|
+
|
936
|
+
|
937
|
+
|
938
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
939
|
+
|
940
|
+
</li>
|
941
|
+
|
942
|
+
|
943
|
+
<li class="public ">
|
944
|
+
<span class="summary_signature">
|
945
|
+
|
946
|
+
<a href="#prepare-instance_method" title="#prepare (instance method)">- (Object) <strong>prepare</strong> </a>
|
947
|
+
|
948
|
+
|
949
|
+
|
950
|
+
</span>
|
951
|
+
|
952
|
+
|
953
|
+
|
954
|
+
|
955
|
+
|
956
|
+
|
957
|
+
|
958
|
+
|
959
|
+
<span class="summary_desc"><div class='inline'>
|
960
|
+
<p>Prepare the parameter for execution or delegation, depending on what
|
961
|
+
context we're in.</p>
|
962
|
+
</div></span>
|
963
|
+
|
964
|
+
</li>
|
965
|
+
|
966
|
+
|
967
|
+
<li class="protected ">
|
968
|
+
<span class="summary_signature">
|
969
|
+
|
970
|
+
<a href="#prepare_prerequisites-instance_method" title="#prepare_prerequisites (instance method)">- (Object) <strong>prepare_prerequisites</strong> </a>
|
971
|
+
|
972
|
+
|
973
|
+
|
974
|
+
</span>
|
975
|
+
|
976
|
+
|
977
|
+
<span class="note title protected">protected</span>
|
978
|
+
|
979
|
+
|
980
|
+
|
981
|
+
|
982
|
+
|
983
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
984
|
+
|
985
|
+
</li>
|
986
|
+
|
987
|
+
|
988
|
+
<li class="public ">
|
989
|
+
<span class="summary_signature">
|
990
|
+
|
991
|
+
<a href="#prepared%3F-instance_method" title="#prepared? (instance method)">- (Boolean) <strong>prepared?</strong> </a>
|
992
|
+
|
993
|
+
|
994
|
+
|
995
|
+
</span>
|
996
|
+
|
997
|
+
|
998
|
+
|
999
|
+
|
1000
|
+
|
1001
|
+
|
1002
|
+
|
1003
|
+
|
1004
|
+
<span class="summary_desc"><div class='inline'>
|
1005
|
+
<p>Returns true if this parameter has already been prepared.</p>
|
1006
|
+
</div></span>
|
1007
|
+
|
1008
|
+
</li>
|
1009
|
+
|
1010
|
+
|
1011
|
+
<li class="public ">
|
1012
|
+
<span class="summary_signature">
|
1013
|
+
|
1014
|
+
<a href="#required%3F-instance_method" title="#required? (instance method)">- (Boolean) <strong>required?</strong> </a>
|
1015
|
+
|
1016
|
+
|
1017
|
+
|
1018
|
+
</span>
|
1019
|
+
|
1020
|
+
|
1021
|
+
|
1022
|
+
|
1023
|
+
|
1024
|
+
|
1025
|
+
|
1026
|
+
|
1027
|
+
<span class="summary_desc"><div class='inline'>
|
1028
|
+
<p>Returns Boolean value if this parameter is required.</p>
|
1029
|
+
</div></span>
|
1030
|
+
|
1031
|
+
</li>
|
1032
|
+
|
1033
|
+
|
1034
|
+
<li class="public ">
|
1035
|
+
<span class="summary_signature">
|
1036
|
+
|
1037
|
+
<a href="#shell_value-instance_method" title="#shell_value (instance method)">- (Object) <strong>shell_value</strong> </a>
|
1038
|
+
|
1039
|
+
|
1040
|
+
|
1041
|
+
</span>
|
1042
|
+
|
1043
|
+
|
1044
|
+
|
1045
|
+
|
1046
|
+
|
1047
|
+
|
1048
|
+
|
1049
|
+
|
1050
|
+
<span class="summary_desc"><div class='inline'>
|
1051
|
+
<p>The String representation of the value in a format that is appropriate for
|
1052
|
+
the terminal.</p>
|
1053
|
+
</div></span>
|
1054
|
+
|
1055
|
+
</li>
|
1056
|
+
|
1057
|
+
|
1058
|
+
<li class="public ">
|
1059
|
+
<span class="summary_signature">
|
1060
|
+
|
1061
|
+
<a href="#short_prefix-instance_method" title="#short_prefix (instance method)">- (Object) <strong>short_prefix</strong> </a>
|
1062
|
+
|
1063
|
+
|
1064
|
+
|
1065
|
+
</span>
|
1066
|
+
|
1067
|
+
|
1068
|
+
|
1069
|
+
|
1070
|
+
|
1071
|
+
|
1072
|
+
|
1073
|
+
|
1074
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
1075
|
+
|
1076
|
+
</li>
|
1077
|
+
|
1078
|
+
|
1079
|
+
<li class="public ">
|
1080
|
+
<span class="summary_signature">
|
1081
|
+
|
1082
|
+
<a href="#to_rdoc-instance_method" title="#to_rdoc (instance method)">- (Object) <strong>to_rdoc</strong> </a>
|
1083
|
+
|
1084
|
+
|
1085
|
+
|
1086
|
+
</span>
|
1087
|
+
|
1088
|
+
|
1089
|
+
|
1090
|
+
|
1091
|
+
|
1092
|
+
|
1093
|
+
|
1094
|
+
|
1095
|
+
<span class="summary_desc"><div class='inline'>
|
1096
|
+
<p>Create a string that can be turned into a file that rdoc can parse to
|
1097
|
+
describe the customized or generated task using param name, type and
|
1098
|
+
description.</p>
|
1099
|
+
</div></span>
|
1100
|
+
|
1101
|
+
</li>
|
1102
|
+
|
1103
|
+
|
1104
|
+
<li class="public ">
|
1105
|
+
<span class="summary_signature">
|
1106
|
+
|
1107
|
+
<a href="#to_shell-instance_method" title="#to_shell (instance method)">- (Object) <strong>to_shell</strong> </a>
|
1108
|
+
|
1109
|
+
|
1110
|
+
|
1111
|
+
</span>
|
1112
|
+
|
1113
|
+
|
1114
|
+
|
1115
|
+
|
1116
|
+
|
1117
|
+
|
1118
|
+
|
1119
|
+
|
1120
|
+
<span class="summary_desc"><div class='inline'>
|
1121
|
+
<p>Prepare and serialize this parameter to a string that is appropriate for
|
1122
|
+
shell execution on the current platform.</p>
|
1123
|
+
</div></span>
|
1124
|
+
|
1125
|
+
</li>
|
1126
|
+
|
1127
|
+
|
1128
|
+
<li class="public ">
|
1129
|
+
<span class="summary_signature">
|
1130
|
+
|
1131
|
+
<a href="#validate-instance_method" title="#validate (instance method)">- (Object) <strong>validate</strong> </a>
|
1132
|
+
|
1133
|
+
|
1134
|
+
|
1135
|
+
</span>
|
1136
|
+
|
1137
|
+
|
1138
|
+
|
1139
|
+
|
1140
|
+
|
1141
|
+
|
1142
|
+
|
1143
|
+
|
1144
|
+
<span class="summary_desc"><div class='inline'>
|
1145
|
+
<p>Ensure this parameter is in a valid state, raise a
|
1146
|
+
Sprout::Errors::MissingArgumentError if it is not.</p>
|
1147
|
+
</div></span>
|
1148
|
+
|
1149
|
+
</li>
|
1150
|
+
|
1151
|
+
|
1152
|
+
<li class="public ">
|
1153
|
+
<span class="summary_signature">
|
1154
|
+
|
1155
|
+
<a href="#visible%3F-instance_method" title="#visible? (instance method)">- (Boolean) <strong>visible?</strong> </a>
|
1156
|
+
|
1157
|
+
|
1158
|
+
|
1159
|
+
</span>
|
1160
|
+
|
1161
|
+
|
1162
|
+
|
1163
|
+
|
1164
|
+
|
1165
|
+
|
1166
|
+
|
1167
|
+
|
1168
|
+
<span class="summary_desc"><div class='inline'>
|
1169
|
+
<p>By default, Executable::Params only appear in the shell output when they
|
1170
|
+
are not nil.</p>
|
1171
|
+
</div></span>
|
1172
|
+
|
1173
|
+
</li>
|
1174
|
+
|
1175
|
+
|
1176
|
+
</ul>
|
1177
|
+
|
1178
|
+
|
1179
|
+
<div id="constructor_details" class="method_details_list">
|
1180
|
+
<h2>Constructor Details</h2>
|
1181
|
+
|
1182
|
+
<div class="method_details first">
|
1183
|
+
<p class="signature first" id="initialize-instance_method">
|
1184
|
+
|
1185
|
+
- (<tt><span class='object_link'><a href="" title="Sprout::Executable::Param (class)">Param</a></span></tt>) <strong>initialize</strong>
|
1186
|
+
|
1187
|
+
|
1188
|
+
|
1189
|
+
</p><div class="docstring">
|
1190
|
+
<div class="discussion">
|
1191
|
+
|
1192
|
+
<p>Default constructor for Params, if you create a new concrete type, be sure
|
1193
|
+
to call <tt>super()</tt> in your own constructor.</p>
|
1194
|
+
|
1195
|
+
|
1196
|
+
</div>
|
1197
|
+
</div>
|
1198
|
+
<div class="tags">
|
1199
|
+
|
1200
|
+
</div><table class="source_code">
|
1201
|
+
<tr>
|
1202
|
+
<td>
|
1203
|
+
<pre class="lines">
|
1204
|
+
|
1205
|
+
|
1206
|
+
234
|
1207
|
+
235
|
1208
|
+
236
|
1209
|
+
237
|
1210
|
+
238
|
1211
|
+
239
|
1212
|
+
240</pre>
|
1213
|
+
</td>
|
1214
|
+
<td>
|
1215
|
+
<pre class="code"><span class="info file"># File 'lib/sprout/executable/param.rb', line 234</span>
|
1216
|
+
|
1217
|
+
<span class='kw'>def</span> <span class='id initialize'>initialize</span>
|
1218
|
+
<span class='ivar'>@description</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Default Description</span><span class='tstring_end'>'</span></span>
|
1219
|
+
<span class='ivar'>@hidden_value</span> <span class='op'>=</span> <span class='kw'>false</span>
|
1220
|
+
<span class='ivar'>@hidden_name</span> <span class='op'>=</span> <span class='kw'>false</span>
|
1221
|
+
<span class='ivar'>@delimiter</span> <span class='op'>=</span> <span class='const'>DEFAULT_DELIMITER</span>
|
1222
|
+
<span class='ivar'>@option_parser_type_name</span> <span class='op'>=</span> <span class='const'>DEFAULT_OPTION_PARSER_TYPE_NAME</span>
|
1223
|
+
<span class='kw'>end</span></pre>
|
1224
|
+
</td>
|
1225
|
+
</tr>
|
1226
|
+
</table>
|
1227
|
+
</div>
|
1228
|
+
|
1229
|
+
</div>
|
1230
|
+
|
1231
|
+
<div id="instance_attr_details" class="attr_details">
|
1232
|
+
<h2>Instance Attribute Details</h2>
|
1233
|
+
|
1234
|
+
|
1235
|
+
<span id="belongs_to=-instance_method"></span>
|
1236
|
+
<span id="belongs_to-instance_method"></span>
|
1237
|
+
<div class="method_details first">
|
1238
|
+
<p class="signature first" id="belongs_to-instance_method">
|
1239
|
+
|
1240
|
+
- (<tt>Object</tt>) <strong>belongs_to</strong>
|
1241
|
+
|
1242
|
+
|
1243
|
+
|
1244
|
+
</p><div class="docstring">
|
1245
|
+
<div class="discussion">
|
1246
|
+
|
1247
|
+
<p>The Sprout::Executable that this parameter instance belongs to.</p>
|
1248
|
+
|
1249
|
+
|
1250
|
+
</div>
|
1251
|
+
</div>
|
1252
|
+
<div class="tags">
|
1253
|
+
|
1254
|
+
</div><table class="source_code">
|
1255
|
+
<tr>
|
1256
|
+
<td>
|
1257
|
+
<pre class="lines">
|
1258
|
+
|
1259
|
+
|
1260
|
+
60
|
1261
|
+
61
|
1262
|
+
62</pre>
|
1263
|
+
</td>
|
1264
|
+
<td>
|
1265
|
+
<pre class="code"><span class="info file"># File 'lib/sprout/executable/param.rb', line 60</span>
|
1266
|
+
|
1267
|
+
<span class='kw'>def</span> <span class='id belongs_to'>belongs_to</span>
|
1268
|
+
<span class='ivar'>@belongs_to</span>
|
1269
|
+
<span class='kw'>end</span></pre>
|
1270
|
+
</td>
|
1271
|
+
</tr>
|
1272
|
+
</table>
|
1273
|
+
</div>
|
1274
|
+
|
1275
|
+
|
1276
|
+
<span id="delimiter=-instance_method"></span>
|
1277
|
+
<span id="delimiter-instance_method"></span>
|
1278
|
+
<div class="method_details ">
|
1279
|
+
<p class="signature " id="delimiter-instance_method">
|
1280
|
+
|
1281
|
+
- (<tt>Object</tt>) <strong>delimiter</strong>
|
1282
|
+
|
1283
|
+
|
1284
|
+
|
1285
|
+
</p><div class="docstring">
|
1286
|
+
<div class="discussion">
|
1287
|
+
|
1288
|
+
<p>Executable::Params join their name/value pair with an equals sign by
|
1289
|
+
default, this can be modified To a space or whatever you wish.</p>
|
1290
|
+
|
1291
|
+
|
1292
|
+
</div>
|
1293
|
+
</div>
|
1294
|
+
<div class="tags">
|
1295
|
+
|
1296
|
+
</div><table class="source_code">
|
1297
|
+
<tr>
|
1298
|
+
<td>
|
1299
|
+
<pre class="lines">
|
1300
|
+
|
1301
|
+
|
1302
|
+
66
|
1303
|
+
67
|
1304
|
+
68</pre>
|
1305
|
+
</td>
|
1306
|
+
<td>
|
1307
|
+
<pre class="code"><span class="info file"># File 'lib/sprout/executable/param.rb', line 66</span>
|
1308
|
+
|
1309
|
+
<span class='kw'>def</span> <span class='id delimiter'>delimiter</span>
|
1310
|
+
<span class='ivar'>@delimiter</span>
|
1311
|
+
<span class='kw'>end</span></pre>
|
1312
|
+
</td>
|
1313
|
+
</tr>
|
1314
|
+
</table>
|
1315
|
+
</div>
|
1316
|
+
|
1317
|
+
|
1318
|
+
<span id="description=-instance_method"></span>
|
1319
|
+
<span id="description-instance_method"></span>
|
1320
|
+
<div class="method_details ">
|
1321
|
+
<p class="signature " id="description-instance_method">
|
1322
|
+
|
1323
|
+
- (<tt>Object</tt>) <strong>description</strong>
|
1324
|
+
|
1325
|
+
|
1326
|
+
|
1327
|
+
</p><div class="docstring">
|
1328
|
+
<div class="discussion">
|
1329
|
+
|
1330
|
+
<p>The String description that will be used for RDoc documentation and user
|
1331
|
+
help.</p>
|
1332
|
+
|
1333
|
+
|
1334
|
+
</div>
|
1335
|
+
</div>
|
1336
|
+
<div class="tags">
|
1337
|
+
|
1338
|
+
</div><table class="source_code">
|
1339
|
+
<tr>
|
1340
|
+
<td>
|
1341
|
+
<pre class="lines">
|
1342
|
+
|
1343
|
+
|
1344
|
+
71
|
1345
|
+
72
|
1346
|
+
73</pre>
|
1347
|
+
</td>
|
1348
|
+
<td>
|
1349
|
+
<pre class="code"><span class="info file"># File 'lib/sprout/executable/param.rb', line 71</span>
|
1350
|
+
|
1351
|
+
<span class='kw'>def</span> <span class='id description'>description</span>
|
1352
|
+
<span class='ivar'>@description</span>
|
1353
|
+
<span class='kw'>end</span></pre>
|
1354
|
+
</td>
|
1355
|
+
</tr>
|
1356
|
+
</table>
|
1357
|
+
</div>
|
1358
|
+
|
1359
|
+
|
1360
|
+
<span id="file_expression=-instance_method"></span>
|
1361
|
+
<span id="file_expression-instance_method"></span>
|
1362
|
+
<div class="method_details ">
|
1363
|
+
<p class="signature " id="file_expression-instance_method">
|
1364
|
+
|
1365
|
+
- (<tt>Object</tt>) <strong>file_expression</strong>
|
1366
|
+
|
1367
|
+
|
1368
|
+
|
1369
|
+
</p><table class="source_code">
|
1370
|
+
<tr>
|
1371
|
+
<td>
|
1372
|
+
<pre class="lines">
|
1373
|
+
|
1374
|
+
|
1375
|
+
371
|
1376
|
+
372
|
1377
|
+
373</pre>
|
1378
|
+
</td>
|
1379
|
+
<td>
|
1380
|
+
<pre class="code"><span class="info file"># File 'lib/sprout/executable/param.rb', line 371</span>
|
1381
|
+
|
1382
|
+
<span class='kw'>def</span> <span class='id file_expression'>file_expression</span>
|
1383
|
+
<span class='ivar'>@file_expression</span> <span class='op'>||=</span> <span class='id belongs_to'>belongs_to</span><span class='period'>.</span><span class='id default_file_expression'>default_file_expression</span>
|
1384
|
+
<span class='kw'>end</span></pre>
|
1385
|
+
</td>
|
1386
|
+
</tr>
|
1387
|
+
</table>
|
1388
|
+
</div>
|
1389
|
+
|
1390
|
+
|
1391
|
+
<span id="hidden_name=-instance_method"></span>
|
1392
|
+
<span id="hidden_name-instance_method"></span>
|
1393
|
+
<div class="method_details ">
|
1394
|
+
<p class="signature " id="hidden_name-instance_method">
|
1395
|
+
|
1396
|
+
- (<tt>Object</tt>) <strong>hidden_name</strong>
|
1397
|
+
|
1398
|
+
|
1399
|
+
|
1400
|
+
</p><div class="docstring">
|
1401
|
+
<div class="discussion">
|
1402
|
+
|
1403
|
+
<p>Boolean value that hides the name parameter from the shell execution.</p>
|
1404
|
+
|
1405
|
+
<pre class="code"><span class='id add_param'>add_param</span> <span class='symbol'>:name</span><span class='comma'>,</span> <span class='const'>String</span><span class='comma'>,</span> <span class='symbol'>:hidden_name</span> <span class='op'>=></span> <span class='kw'>true</span></pre>
|
1406
|
+
|
1407
|
+
<p>Without this option, the above parameter would serialize to the process
|
1408
|
+
like:</p>
|
1409
|
+
|
1410
|
+
<pre class="code"><span class='id foo'>foo</span> <span class='op'>-</span><span class='op'>-</span><span class='id name'>name</span><span class='op'>=</span><span class='const'>Value</span></pre>
|
1411
|
+
|
1412
|
+
<p>But with this option, the above parameter would serialize to the process
|
1413
|
+
like:</p>
|
1414
|
+
|
1415
|
+
<pre class="code"><span class='id foo'>foo</span> <span class='const'>Value</span></pre>
|
1416
|
+
|
1417
|
+
|
1418
|
+
</div>
|
1419
|
+
</div>
|
1420
|
+
<div class="tags">
|
1421
|
+
|
1422
|
+
</div><table class="source_code">
|
1423
|
+
<tr>
|
1424
|
+
<td>
|
1425
|
+
<pre class="lines">
|
1426
|
+
|
1427
|
+
|
1428
|
+
89
|
1429
|
+
90
|
1430
|
+
91</pre>
|
1431
|
+
</td>
|
1432
|
+
<td>
|
1433
|
+
<pre class="code"><span class="info file"># File 'lib/sprout/executable/param.rb', line 89</span>
|
1434
|
+
|
1435
|
+
<span class='kw'>def</span> <span class='id hidden_name'>hidden_name</span>
|
1436
|
+
<span class='ivar'>@hidden_name</span>
|
1437
|
+
<span class='kw'>end</span></pre>
|
1438
|
+
</td>
|
1439
|
+
</tr>
|
1440
|
+
</table>
|
1441
|
+
</div>
|
1442
|
+
|
1443
|
+
|
1444
|
+
<span id="hidden_value=-instance_method"></span>
|
1445
|
+
<span id="hidden_value-instance_method"></span>
|
1446
|
+
<div class="method_details ">
|
1447
|
+
<p class="signature " id="hidden_value-instance_method">
|
1448
|
+
|
1449
|
+
- (<tt>Object</tt>) <strong>hidden_value</strong>
|
1450
|
+
|
1451
|
+
|
1452
|
+
|
1453
|
+
</p><div class="docstring">
|
1454
|
+
<div class="discussion">
|
1455
|
+
|
1456
|
+
<p>Boolean value that hides the value parameter from the shell execution.</p>
|
1457
|
+
|
1458
|
+
<pre class="code"><span class='id add_param'>add_param</span> <span class='symbol'>:visible</span><span class='comma'>,</span> <span class='const'>Boolean</span><span class='comma'>,</span> <span class='symbol'>:hidden_value</span> <span class='op'>=></span> <span class='kw'>true</span></pre>
|
1459
|
+
|
1460
|
+
<p>Without this option, the above parameter would serialize to the process
|
1461
|
+
like:</p>
|
1462
|
+
|
1463
|
+
<pre class="code"><span class='id foo'>foo</span> <span class='op'>-</span><span class='op'>-</span><span class='id visible'>visible</span><span class='op'>=</span><span class='kw'>true</span></pre>
|
1464
|
+
|
1465
|
+
<p>But with this option, the above parameter would serialize to the process
|
1466
|
+
like:</p>
|
1467
|
+
|
1468
|
+
<pre class="code"><span class='id foo'>foo</span> <span class='op'>-</span><span class='op'>-</span><span class='id visible'>visible</span></pre>
|
1469
|
+
|
1470
|
+
|
1471
|
+
</div>
|
1472
|
+
</div>
|
1473
|
+
<div class="tags">
|
1474
|
+
|
1475
|
+
</div><table class="source_code">
|
1476
|
+
<tr>
|
1477
|
+
<td>
|
1478
|
+
<pre class="lines">
|
1479
|
+
|
1480
|
+
|
1481
|
+
107
|
1482
|
+
108
|
1483
|
+
109</pre>
|
1484
|
+
</td>
|
1485
|
+
<td>
|
1486
|
+
<pre class="code"><span class="info file"># File 'lib/sprout/executable/param.rb', line 107</span>
|
1487
|
+
|
1488
|
+
<span class='kw'>def</span> <span class='id hidden_value'>hidden_value</span>
|
1489
|
+
<span class='ivar'>@hidden_value</span>
|
1490
|
+
<span class='kw'>end</span></pre>
|
1491
|
+
</td>
|
1492
|
+
</tr>
|
1493
|
+
</table>
|
1494
|
+
</div>
|
1495
|
+
|
1496
|
+
|
1497
|
+
<span id="name=-instance_method"></span>
|
1498
|
+
<span id="name-instance_method"></span>
|
1499
|
+
<div class="method_details ">
|
1500
|
+
<p class="signature " id="name-instance_method">
|
1501
|
+
|
1502
|
+
- (<tt>Object</tt>) <strong>name</strong>
|
1503
|
+
|
1504
|
+
|
1505
|
+
|
1506
|
+
</p><div class="docstring">
|
1507
|
+
<div class="discussion">
|
1508
|
+
|
1509
|
+
<p>The String (or Symbol) name of the parameter.</p>
|
1510
|
+
|
1511
|
+
|
1512
|
+
</div>
|
1513
|
+
</div>
|
1514
|
+
<div class="tags">
|
1515
|
+
|
1516
|
+
</div><table class="source_code">
|
1517
|
+
<tr>
|
1518
|
+
<td>
|
1519
|
+
<pre class="lines">
|
1520
|
+
|
1521
|
+
|
1522
|
+
111
|
1523
|
+
112
|
1524
|
+
113</pre>
|
1525
|
+
</td>
|
1526
|
+
<td>
|
1527
|
+
<pre class="code"><span class="info file"># File 'lib/sprout/executable/param.rb', line 111</span>
|
1528
|
+
|
1529
|
+
<span class='kw'>def</span> <span class='id name'>name</span>
|
1530
|
+
<span class='ivar'>@name</span>
|
1531
|
+
<span class='kw'>end</span></pre>
|
1532
|
+
</td>
|
1533
|
+
</tr>
|
1534
|
+
</table>
|
1535
|
+
</div>
|
1536
|
+
|
1537
|
+
|
1538
|
+
<span id="prefix=-instance_method"></span>
|
1539
|
+
<span id="prefix-instance_method"></span>
|
1540
|
+
<div class="method_details ">
|
1541
|
+
<p class="signature " id="prefix-instance_method">
|
1542
|
+
|
1543
|
+
- (<tt>Object</tt>) <strong>prefix</strong>
|
1544
|
+
|
1545
|
+
|
1546
|
+
|
1547
|
+
</p><div class="docstring">
|
1548
|
+
<div class="discussion">
|
1549
|
+
|
1550
|
+
<p>Leading character for each parameter Can sometimes be an empty string,
|
1551
|
+
other times it's a double dash '--' but usually it's just a single dash '-'</p>
|
1552
|
+
|
1553
|
+
|
1554
|
+
</div>
|
1555
|
+
</div>
|
1556
|
+
<div class="tags">
|
1557
|
+
|
1558
|
+
</div><table class="source_code">
|
1559
|
+
<tr>
|
1560
|
+
<td>
|
1561
|
+
<pre class="lines">
|
1562
|
+
|
1563
|
+
|
1564
|
+
121
|
1565
|
+
122
|
1566
|
+
123</pre>
|
1567
|
+
</td>
|
1568
|
+
<td>
|
1569
|
+
<pre class="code"><span class="info file"># File 'lib/sprout/executable/param.rb', line 121</span>
|
1570
|
+
|
1571
|
+
<span class='kw'>def</span> <span class='id prefix'>prefix</span>
|
1572
|
+
<span class='ivar'>@prefix</span> <span class='op'>||=</span> <span class='lparen'>(</span><span class='id belongs_to'>belongs_to</span><span class='period'>.</span><span class='id nil?'>nil?</span><span class='rparen'>)</span> <span class='op'>?</span> <span class='const'>DEFAULT_PREFIX</span> <span class='op'>:</span> <span class='id belongs_to'>belongs_to</span><span class='period'>.</span><span class='id default_prefix'>default_prefix</span>
|
1573
|
+
<span class='kw'>end</span></pre>
|
1574
|
+
</td>
|
1575
|
+
</tr>
|
1576
|
+
</table>
|
1577
|
+
</div>
|
1578
|
+
|
1579
|
+
|
1580
|
+
<span id="reader=-instance_method"></span>
|
1581
|
+
<span id="reader-instance_method"></span>
|
1582
|
+
<div class="method_details ">
|
1583
|
+
<p class="signature " id="reader-instance_method">
|
1584
|
+
|
1585
|
+
- (<tt>Object</tt>) <strong>reader</strong>
|
1586
|
+
|
1587
|
+
|
1588
|
+
|
1589
|
+
</p><div class="docstring">
|
1590
|
+
<div class="discussion">
|
1591
|
+
|
1592
|
+
<p>A Symbol that refers to a method that will return the expected value when
|
1593
|
+
called. This method can be private.</p>
|
1594
|
+
|
1595
|
+
<pre class="code"><span class='id add_param'>add_param</span> <span class='symbol'>:visible</span><span class='comma'>,</span> <span class='const'>Boolean</span><span class='comma'>,</span> <span class='symbol'>:reader</span> <span class='op'>=></span> <span class='symbol'>:get_visible</span>
|
1596
|
+
|
1597
|
+
<span class='kw'>def</span> <span class='id get_visible'>get_visible</span>
|
1598
|
+
<span class='kw'>return</span> <span class='ivar'>@visible</span>
|
1599
|
+
<span class='kw'>end</span></pre>
|
1600
|
+
|
1601
|
+
|
1602
|
+
</div>
|
1603
|
+
</div>
|
1604
|
+
<div class="tags">
|
1605
|
+
|
1606
|
+
</div><table class="source_code">
|
1607
|
+
<tr>
|
1608
|
+
<td>
|
1609
|
+
<pre class="lines">
|
1610
|
+
|
1611
|
+
|
1612
|
+
133
|
1613
|
+
134
|
1614
|
+
135</pre>
|
1615
|
+
</td>
|
1616
|
+
<td>
|
1617
|
+
<pre class="code"><span class="info file"># File 'lib/sprout/executable/param.rb', line 133</span>
|
1618
|
+
|
1619
|
+
<span class='kw'>def</span> <span class='id reader'>reader</span>
|
1620
|
+
<span class='ivar'>@reader</span>
|
1621
|
+
<span class='kw'>end</span></pre>
|
1622
|
+
</td>
|
1623
|
+
</tr>
|
1624
|
+
</table>
|
1625
|
+
</div>
|
1626
|
+
|
1627
|
+
|
1628
|
+
<span id="required=-instance_method"></span>
|
1629
|
+
<span id="required-instance_method"></span>
|
1630
|
+
<div class="method_details ">
|
1631
|
+
<p class="signature " id="required-instance_method">
|
1632
|
+
|
1633
|
+
- (<tt>Object</tt>) <strong>required</strong>
|
1634
|
+
|
1635
|
+
|
1636
|
+
|
1637
|
+
</p><div class="docstring">
|
1638
|
+
<div class="discussion">
|
1639
|
+
|
1640
|
+
<p>Boolean value that will cause a Sprout::Errors::UsageError if the
|
1641
|
+
executable is invoked without this parameter first being set.</p>
|
1642
|
+
|
1643
|
+
<pre class="code">add_param :visible, Boolean :required => true</pre>
|
1644
|
+
|
1645
|
+
<p>Default false</p>
|
1646
|
+
|
1647
|
+
|
1648
|
+
</div>
|
1649
|
+
</div>
|
1650
|
+
<div class="tags">
|
1651
|
+
|
1652
|
+
</div><table class="source_code">
|
1653
|
+
<tr>
|
1654
|
+
<td>
|
1655
|
+
<pre class="lines">
|
1656
|
+
|
1657
|
+
|
1658
|
+
144
|
1659
|
+
145
|
1660
|
+
146</pre>
|
1661
|
+
</td>
|
1662
|
+
<td>
|
1663
|
+
<pre class="code"><span class="info file"># File 'lib/sprout/executable/param.rb', line 144</span>
|
1664
|
+
|
1665
|
+
<span class='kw'>def</span> <span class='id required'>required</span>
|
1666
|
+
<span class='ivar'>@required</span>
|
1667
|
+
<span class='kw'>end</span></pre>
|
1668
|
+
</td>
|
1669
|
+
</tr>
|
1670
|
+
</table>
|
1671
|
+
</div>
|
1672
|
+
|
1673
|
+
|
1674
|
+
<span id="shell_name=-instance_method"></span>
|
1675
|
+
<span id="shell_name-instance_method"></span>
|
1676
|
+
<div class="method_details ">
|
1677
|
+
<p class="signature " id="shell_name-instance_method">
|
1678
|
+
|
1679
|
+
- (<tt>Object</tt>) <strong>shell_name</strong>
|
1680
|
+
|
1681
|
+
|
1682
|
+
|
1683
|
+
</p><table class="source_code">
|
1684
|
+
<tr>
|
1685
|
+
<td>
|
1686
|
+
<pre class="lines">
|
1687
|
+
|
1688
|
+
|
1689
|
+
375
|
1690
|
+
376
|
1691
|
+
377</pre>
|
1692
|
+
</td>
|
1693
|
+
<td>
|
1694
|
+
<pre class="code"><span class="info file"># File 'lib/sprout/executable/param.rb', line 375</span>
|
1695
|
+
|
1696
|
+
<span class='kw'>def</span> <span class='id shell_name'>shell_name</span>
|
1697
|
+
<span class='ivar'>@shell_name</span> <span class='op'>||=</span> <span class='id prefix'>prefix</span> <span class='op'>+</span> <span class='id name'>name</span><span class='period'>.</span><span class='id to_s'>to_s</span><span class='period'>.</span><span class='id split'>split</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>_</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id join'>join</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>-</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
1698
|
+
<span class='kw'>end</span></pre>
|
1699
|
+
</td>
|
1700
|
+
</tr>
|
1701
|
+
</table>
|
1702
|
+
</div>
|
1703
|
+
|
1704
|
+
|
1705
|
+
<span id="short_name=-instance_method"></span>
|
1706
|
+
<span id="short_name-instance_method"></span>
|
1707
|
+
<div class="method_details ">
|
1708
|
+
<p class="signature " id="short_name-instance_method">
|
1709
|
+
|
1710
|
+
- (<tt>Object</tt>) <strong>short_name</strong>
|
1711
|
+
|
1712
|
+
|
1713
|
+
|
1714
|
+
</p><div class="docstring">
|
1715
|
+
<div class="discussion">
|
1716
|
+
|
1717
|
+
<p>The short name for this parameter. If it's not explicitly, the first
|
1718
|
+
character of the parameter name will be used. When multiple parameters have
|
1719
|
+
the same first character, the first one encountered will win.</p>
|
1720
|
+
|
1721
|
+
|
1722
|
+
</div>
|
1723
|
+
</div>
|
1724
|
+
<div class="tags">
|
1725
|
+
|
1726
|
+
</div><table class="source_code">
|
1727
|
+
<tr>
|
1728
|
+
<td>
|
1729
|
+
<pre class="lines">
|
1730
|
+
|
1731
|
+
|
1732
|
+
356
|
1733
|
+
357
|
1734
|
+
358</pre>
|
1735
|
+
</td>
|
1736
|
+
<td>
|
1737
|
+
<pre class="code"><span class="info file"># File 'lib/sprout/executable/param.rb', line 356</span>
|
1738
|
+
|
1739
|
+
<span class='kw'>def</span> <span class='id short_name'>short_name</span>
|
1740
|
+
<span class='ivar'>@short_name</span> <span class='op'>||=</span> <span class='id name'>name</span><span class='period'>.</span><span class='id to_s'>to_s</span><span class='period'>.</span><span class='id split'>split</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id shift'>shift</span>
|
1741
|
+
<span class='kw'>end</span></pre>
|
1742
|
+
</td>
|
1743
|
+
</tr>
|
1744
|
+
</table>
|
1745
|
+
</div>
|
1746
|
+
|
1747
|
+
|
1748
|
+
<span id="to_shell_proc=-instance_method"></span>
|
1749
|
+
<span id="to_shell_proc-instance_method"></span>
|
1750
|
+
<div class="method_details ">
|
1751
|
+
<p class="signature " id="to_shell_proc-instance_method">
|
1752
|
+
|
1753
|
+
- (<tt>Object</tt>) <strong>to_shell_proc</strong>
|
1754
|
+
|
1755
|
+
|
1756
|
+
|
1757
|
+
</p><div class="docstring">
|
1758
|
+
<div class="discussion">
|
1759
|
+
|
1760
|
+
<p>An optional Proc that should be called when this parameter is serialized to
|
1761
|
+
shell output. The Proc should return a String value that makes sense to
|
1762
|
+
the underlying process.</p>
|
1763
|
+
|
1764
|
+
<pre class="code"><span class='id add_param'>add_param</span> <span class='symbol'>:visible</span><span class='comma'>,</span> <span class='const'>Boolean</span><span class='comma'>,</span> <span class='symbol'>:to_shell_proc</span> <span class='op'>=></span> <span class='const'>Proc</span><span class='period'>.</span><span class='id new'>new</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id p'>p</span><span class='op'>|</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>---result</span><span class='tstring_end'>"</span></span> <span class='rbrace'>}</span></pre>
|
1765
|
+
|
1766
|
+
|
1767
|
+
</div>
|
1768
|
+
</div>
|
1769
|
+
<div class="tags">
|
1770
|
+
|
1771
|
+
</div><table class="source_code">
|
1772
|
+
<tr>
|
1773
|
+
<td>
|
1774
|
+
<pre class="lines">
|
1775
|
+
|
1776
|
+
|
1777
|
+
153
|
1778
|
+
154
|
1779
|
+
155</pre>
|
1780
|
+
</td>
|
1781
|
+
<td>
|
1782
|
+
<pre class="code"><span class="info file"># File 'lib/sprout/executable/param.rb', line 153</span>
|
1783
|
+
|
1784
|
+
<span class='kw'>def</span> <span class='id to_shell_proc'>to_shell_proc</span>
|
1785
|
+
<span class='ivar'>@to_shell_proc</span>
|
1786
|
+
<span class='kw'>end</span></pre>
|
1787
|
+
</td>
|
1788
|
+
</tr>
|
1789
|
+
</table>
|
1790
|
+
</div>
|
1791
|
+
|
1792
|
+
|
1793
|
+
<span id="type=-instance_method"></span>
|
1794
|
+
<span id="type-instance_method"></span>
|
1795
|
+
<div class="method_details ">
|
1796
|
+
<p class="signature " id="type-instance_method">
|
1797
|
+
|
1798
|
+
- (<tt>Object</tt>) <strong>type</strong>
|
1799
|
+
|
1800
|
+
|
1801
|
+
|
1802
|
+
</p><div class="docstring">
|
1803
|
+
<div class="discussion">
|
1804
|
+
|
1805
|
+
<p>The data type of the parameter, used to generate more appropriate RDoc
|
1806
|
+
content for the concrete Sprout::Executable.</p>
|
1807
|
+
|
1808
|
+
|
1809
|
+
</div>
|
1810
|
+
</div>
|
1811
|
+
<div class="tags">
|
1812
|
+
|
1813
|
+
</div><table class="source_code">
|
1814
|
+
<tr>
|
1815
|
+
<td>
|
1816
|
+
<pre class="lines">
|
1817
|
+
|
1818
|
+
|
1819
|
+
158
|
1820
|
+
159
|
1821
|
+
160</pre>
|
1822
|
+
</td>
|
1823
|
+
<td>
|
1824
|
+
<pre class="code"><span class="info file"># File 'lib/sprout/executable/param.rb', line 158</span>
|
1825
|
+
|
1826
|
+
<span class='kw'>def</span> <span class='id type'>type</span>
|
1827
|
+
<span class='ivar'>@type</span>
|
1828
|
+
<span class='kw'>end</span></pre>
|
1829
|
+
</td>
|
1830
|
+
</tr>
|
1831
|
+
</table>
|
1832
|
+
</div>
|
1833
|
+
|
1834
|
+
|
1835
|
+
<span id="value=-instance_method"></span>
|
1836
|
+
<span id="value-instance_method"></span>
|
1837
|
+
<div class="method_details ">
|
1838
|
+
<p class="signature " id="value-instance_method">
|
1839
|
+
|
1840
|
+
- (<tt>Object</tt>) <strong>value</strong>
|
1841
|
+
|
1842
|
+
|
1843
|
+
|
1844
|
+
</p><div class="docstring">
|
1845
|
+
<div class="discussion">
|
1846
|
+
|
1847
|
+
<p>The value that was assigned to this parameter when the concrete
|
1848
|
+
Sprout::Executable was instantiated and configured.</p>
|
1849
|
+
|
1850
|
+
|
1851
|
+
</div>
|
1852
|
+
</div>
|
1853
|
+
<div class="tags">
|
1854
|
+
|
1855
|
+
</div><table class="source_code">
|
1856
|
+
<tr>
|
1857
|
+
<td>
|
1858
|
+
<pre class="lines">
|
1859
|
+
|
1860
|
+
|
1861
|
+
163
|
1862
|
+
164
|
1863
|
+
165</pre>
|
1864
|
+
</td>
|
1865
|
+
<td>
|
1866
|
+
<pre class="code"><span class="info file"># File 'lib/sprout/executable/param.rb', line 163</span>
|
1867
|
+
|
1868
|
+
<span class='kw'>def</span> <span class='id value'>value</span>
|
1869
|
+
<span class='ivar'>@value</span>
|
1870
|
+
<span class='kw'>end</span></pre>
|
1871
|
+
</td>
|
1872
|
+
</tr>
|
1873
|
+
</table>
|
1874
|
+
</div>
|
1875
|
+
|
1876
|
+
|
1877
|
+
<span id="writer=-instance_method"></span>
|
1878
|
+
<span id="writer-instance_method"></span>
|
1879
|
+
<div class="method_details ">
|
1880
|
+
<p class="signature " id="writer-instance_method">
|
1881
|
+
|
1882
|
+
- (<tt>Object</tt>) <strong>writer</strong>
|
1883
|
+
|
1884
|
+
|
1885
|
+
|
1886
|
+
</p><div class="docstring">
|
1887
|
+
<div class="discussion">
|
1888
|
+
|
1889
|
+
<p>A Symbol that refers to a method (not accessor) that will be called when
|
1890
|
+
the value is set. This method is not responsible for actually storing the
|
1891
|
+
value, but should instead be thought of as a badly named callback that
|
1892
|
+
will be triggered with the new value whenever the value changes.</p>
|
1893
|
+
|
1894
|
+
<p>This method can be private.</p>
|
1895
|
+
|
1896
|
+
<pre class="code"><span class='id add_param'>add_param</span> <span class='symbol'>:visible</span><span class='comma'>,</span> <span class='const'>Boolean</span><span class='comma'>,</span> <span class='symbol'>:writer</span> <span class='op'>=></span> <span class='symbol'>:set_visible</span>
|
1897
|
+
|
1898
|
+
<span class='id private'>private</span>
|
1899
|
+
|
1900
|
+
<span class='kw'>def</span> <span class='id set_visible'>set_visible</span> <span class='id value'>value</span>
|
1901
|
+
<span class='id do_something_with'>do_something_with</span> <span class='id value'>value</span>
|
1902
|
+
<span class='id value'>value</span>
|
1903
|
+
<span class='kw'>end</span></pre>
|
1904
|
+
|
1905
|
+
|
1906
|
+
</div>
|
1907
|
+
</div>
|
1908
|
+
<div class="tags">
|
1909
|
+
|
1910
|
+
</div><table class="source_code">
|
1911
|
+
<tr>
|
1912
|
+
<td>
|
1913
|
+
<pre class="lines">
|
1914
|
+
|
1915
|
+
|
1916
|
+
184
|
1917
|
+
185
|
1918
|
+
186</pre>
|
1919
|
+
</td>
|
1920
|
+
<td>
|
1921
|
+
<pre class="code"><span class="info file"># File 'lib/sprout/executable/param.rb', line 184</span>
|
1922
|
+
|
1923
|
+
<span class='kw'>def</span> <span class='id writer'>writer</span>
|
1924
|
+
<span class='ivar'>@writer</span>
|
1925
|
+
<span class='kw'>end</span></pre>
|
1926
|
+
</td>
|
1927
|
+
</tr>
|
1928
|
+
</table>
|
1929
|
+
</div>
|
1930
|
+
|
1931
|
+
</div>
|
1932
|
+
|
1933
|
+
|
1934
|
+
<div id="instance_method_details" class="method_details_list">
|
1935
|
+
<h2>Instance Method Details</h2>
|
1936
|
+
|
1937
|
+
|
1938
|
+
<div class="method_details first">
|
1939
|
+
<p class="signature first" id="clean_path-instance_method">
|
1940
|
+
|
1941
|
+
- (<tt>Object</tt>) <strong>clean_path</strong>(path) <span class="extras">(protected)</span>
|
1942
|
+
|
1943
|
+
|
1944
|
+
|
1945
|
+
</p><div class="docstring">
|
1946
|
+
<div class="discussion">
|
1947
|
+
|
1948
|
+
<p>Clean the provided path using the current Sprout::System.</p>
|
1949
|
+
|
1950
|
+
|
1951
|
+
</div>
|
1952
|
+
</div>
|
1953
|
+
<div class="tags">
|
1954
|
+
|
1955
|
+
</div><table class="source_code">
|
1956
|
+
<tr>
|
1957
|
+
<td>
|
1958
|
+
<pre class="lines">
|
1959
|
+
|
1960
|
+
|
1961
|
+
428
|
1962
|
+
429
|
1963
|
+
430</pre>
|
1964
|
+
</td>
|
1965
|
+
<td>
|
1966
|
+
<pre class="code"><span class="info file"># File 'lib/sprout/executable/param.rb', line 428</span>
|
1967
|
+
|
1968
|
+
<span class='kw'>def</span> <span class='id clean_path'>clean_path</span> <span class='id path'>path</span>
|
1969
|
+
<span class='const'>Sprout</span><span class='op'>::</span><span class='const'>System</span><span class='period'>.</span><span class='id create'>create</span><span class='period'>.</span><span class='id clean_path'>clean_path</span> <span class='id path'>path</span>
|
1970
|
+
<span class='kw'>end</span></pre>
|
1971
|
+
</td>
|
1972
|
+
</tr>
|
1973
|
+
</table>
|
1974
|
+
</div>
|
1975
|
+
|
1976
|
+
<div class="method_details ">
|
1977
|
+
<p class="signature " id="default-instance_method">
|
1978
|
+
|
1979
|
+
- (<tt>Object</tt>) <strong>default</strong>
|
1980
|
+
|
1981
|
+
|
1982
|
+
|
1983
|
+
</p><div class="docstring">
|
1984
|
+
<div class="discussion">
|
1985
|
+
|
1986
|
+
<p>Return the default value or nil if none was provided.</p>
|
1987
|
+
|
1988
|
+
|
1989
|
+
</div>
|
1990
|
+
</div>
|
1991
|
+
<div class="tags">
|
1992
|
+
|
1993
|
+
</div><table class="source_code">
|
1994
|
+
<tr>
|
1995
|
+
<td>
|
1996
|
+
<pre class="lines">
|
1997
|
+
|
1998
|
+
|
1999
|
+
279
|
2000
|
+
280
|
2001
|
+
281</pre>
|
2002
|
+
</td>
|
2003
|
+
<td>
|
2004
|
+
<pre class="code"><span class="info file"># File 'lib/sprout/executable/param.rb', line 279</span>
|
2005
|
+
|
2006
|
+
<span class='kw'>def</span> <span class='id default'>default</span>
|
2007
|
+
<span class='ivar'>@default</span>
|
2008
|
+
<span class='kw'>end</span></pre>
|
2009
|
+
</td>
|
2010
|
+
</tr>
|
2011
|
+
</table>
|
2012
|
+
</div>
|
2013
|
+
|
2014
|
+
<div class="method_details ">
|
2015
|
+
<p class="signature " id="default=-instance_method">
|
2016
|
+
|
2017
|
+
- (<tt>Object</tt>) <strong>default=</strong>(value)
|
2018
|
+
|
2019
|
+
|
2020
|
+
|
2021
|
+
</p><div class="docstring">
|
2022
|
+
<div class="discussion">
|
2023
|
+
|
2024
|
+
<p>Set the default value of the parameter. Using this option will ensure that
|
2025
|
+
required parameters are not nil, and default values can be overridden on
|
2026
|
+
instances.</p>
|
2027
|
+
|
2028
|
+
<pre class="code"><span class='id add_param'>add_param</span> <span class='symbol'>:name</span><span class='comma'>,</span> <span class='const'>String</span><span class='comma'>,</span> <span class='symbol'>:default</span> <span class='op'>=></span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Bob</span><span class='tstring_end'>'</span></span></pre>
|
2029
|
+
|
2030
|
+
|
2031
|
+
</div>
|
2032
|
+
</div>
|
2033
|
+
<div class="tags">
|
2034
|
+
|
2035
|
+
</div><table class="source_code">
|
2036
|
+
<tr>
|
2037
|
+
<td>
|
2038
|
+
<pre class="lines">
|
2039
|
+
|
2040
|
+
|
2041
|
+
272
|
2042
|
+
273
|
2043
|
+
274
|
2044
|
+
275</pre>
|
2045
|
+
</td>
|
2046
|
+
<td>
|
2047
|
+
<pre class="code"><span class="info file"># File 'lib/sprout/executable/param.rb', line 272</span>
|
2048
|
+
|
2049
|
+
<span class='kw'>def</span> <span class='id default='>default=</span><span class='lparen'>(</span><span class='id value'>value</span><span class='rparen'>)</span>
|
2050
|
+
<span class='kw'>self</span><span class='period'>.</span><span class='id value'>value</span> <span class='op'>=</span> <span class='id value'>value</span>
|
2051
|
+
<span class='ivar'>@default</span> <span class='op'>=</span> <span class='id value'>value</span>
|
2052
|
+
<span class='kw'>end</span></pre>
|
2053
|
+
</td>
|
2054
|
+
</tr>
|
2055
|
+
</table>
|
2056
|
+
</div>
|
2057
|
+
|
2058
|
+
<div class="method_details ">
|
2059
|
+
<p class="signature " id="default_option_parser_declaration-instance_method">
|
2060
|
+
|
2061
|
+
- (<tt>Object</tt>) <strong>default_option_parser_declaration</strong>
|
2062
|
+
|
2063
|
+
|
2064
|
+
|
2065
|
+
</p><table class="source_code">
|
2066
|
+
<tr>
|
2067
|
+
<td>
|
2068
|
+
<pre class="lines">
|
2069
|
+
|
2070
|
+
|
2071
|
+
339
|
2072
|
+
340
|
2073
|
+
341</pre>
|
2074
|
+
</td>
|
2075
|
+
<td>
|
2076
|
+
<pre class="code"><span class="info file"># File 'lib/sprout/executable/param.rb', line 339</span>
|
2077
|
+
|
2078
|
+
<span class='kw'>def</span> <span class='id default_option_parser_declaration'>default_option_parser_declaration</span>
|
2079
|
+
<span class='lbracket'>[</span> <span class='id prefix'>prefix</span><span class='comma'>,</span> <span class='id option_parser_name'>option_parser_name</span> <span class='rbracket'>]</span>
|
2080
|
+
<span class='kw'>end</span></pre>
|
2081
|
+
</td>
|
2082
|
+
</tr>
|
2083
|
+
</table>
|
2084
|
+
</div>
|
2085
|
+
|
2086
|
+
<div class="method_details ">
|
2087
|
+
<p class="signature " id="file_is_output?-instance_method">
|
2088
|
+
|
2089
|
+
- (<tt><span class='object_link'><a href="Boolean.html" title="Sprout::Executable::Boolean (class)">Boolean</a></span></tt>) <strong>file_is_output?</strong>(file) <span class="extras">(protected)</span>
|
2090
|
+
|
2091
|
+
|
2092
|
+
|
2093
|
+
</p><div class="docstring">
|
2094
|
+
<div class="discussion">
|
2095
|
+
|
2096
|
+
<p>Return true if the Sprout::Executable that this parameter
|
2097
|
+
<tt>belongs_to</tt> has an <tt>output</tt> method (or parameter), and if
|
2098
|
+
the provided <tt>file</tt> matches the value of that parameter.</p>
|
2099
|
+
|
2100
|
+
<p>This method (convention) is used to avoid creating circular prerequisites
|
2101
|
+
in Rake. For most types of File parameters we want to make them into
|
2102
|
+
prerequisites, but not if the File is the one being created by the outer
|
2103
|
+
Sprout::Executable.</p>
|
2104
|
+
|
2105
|
+
|
2106
|
+
</div>
|
2107
|
+
</div>
|
2108
|
+
<div class="tags">
|
2109
|
+
<h3>Returns:</h3>
|
2110
|
+
<ul class="return">
|
2111
|
+
|
2112
|
+
<li>
|
2113
|
+
|
2114
|
+
<span class='type'>(<tt><span class='object_link'><a href="Boolean.html" title="Sprout::Executable::Boolean (class)">Boolean</a></span></tt>)</span>
|
2115
|
+
|
2116
|
+
|
2117
|
+
|
2118
|
+
|
2119
|
+
</li>
|
2120
|
+
|
2121
|
+
</ul>
|
2122
|
+
|
2123
|
+
</div><table class="source_code">
|
2124
|
+
<tr>
|
2125
|
+
<td>
|
2126
|
+
<pre class="lines">
|
2127
|
+
|
2128
|
+
|
2129
|
+
442
|
2130
|
+
443
|
2131
|
+
444</pre>
|
2132
|
+
</td>
|
2133
|
+
<td>
|
2134
|
+
<pre class="code"><span class="info file"># File 'lib/sprout/executable/param.rb', line 442</span>
|
2135
|
+
|
2136
|
+
<span class='kw'>def</span> <span class='id file_is_output?'>file_is_output?</span> <span class='id file'>file</span>
|
2137
|
+
<span class='id belongs_to'>belongs_to</span><span class='period'>.</span><span class='id respond_to?'>respond_to?</span><span class='lparen'>(</span><span class='symbol'>:output</span><span class='rparen'>)</span> <span class='op'>&&</span> <span class='id belongs_to'>belongs_to</span><span class='period'>.</span><span class='id output'>output</span><span class='period'>.</span><span class='id to_s'>to_s</span> <span class='op'>==</span> <span class='id file'>file</span>
|
2138
|
+
<span class='kw'>end</span></pre>
|
2139
|
+
</td>
|
2140
|
+
</tr>
|
2141
|
+
</table>
|
2142
|
+
</div>
|
2143
|
+
|
2144
|
+
<div class="method_details ">
|
2145
|
+
<p class="signature " id="hidden_name?-instance_method">
|
2146
|
+
|
2147
|
+
- (<tt><span class='object_link'><a href="Boolean.html" title="Sprout::Executable::Boolean (class)">Boolean</a></span></tt>) <strong>hidden_name?</strong>
|
2148
|
+
|
2149
|
+
|
2150
|
+
|
2151
|
+
</p><div class="docstring">
|
2152
|
+
<div class="discussion">
|
2153
|
+
|
2154
|
+
<p>Should the param name be hidden from the shell? Used for params like
|
2155
|
+
'input' on mxmlc</p>
|
2156
|
+
|
2157
|
+
|
2158
|
+
</div>
|
2159
|
+
</div>
|
2160
|
+
<div class="tags">
|
2161
|
+
<h3>Returns:</h3>
|
2162
|
+
<ul class="return">
|
2163
|
+
|
2164
|
+
<li>
|
2165
|
+
|
2166
|
+
<span class='type'>(<tt><span class='object_link'><a href="Boolean.html" title="Sprout::Executable::Boolean (class)">Boolean</a></span></tt>)</span>
|
2167
|
+
|
2168
|
+
|
2169
|
+
|
2170
|
+
|
2171
|
+
</li>
|
2172
|
+
|
2173
|
+
</ul>
|
2174
|
+
|
2175
|
+
</div><table class="source_code">
|
2176
|
+
<tr>
|
2177
|
+
<td>
|
2178
|
+
<pre class="lines">
|
2179
|
+
|
2180
|
+
|
2181
|
+
300
|
2182
|
+
301
|
2183
|
+
302</pre>
|
2184
|
+
</td>
|
2185
|
+
<td>
|
2186
|
+
<pre class="code"><span class="info file"># File 'lib/sprout/executable/param.rb', line 300</span>
|
2187
|
+
|
2188
|
+
<span class='kw'>def</span> <span class='id hidden_name?'>hidden_name?</span>
|
2189
|
+
<span class='ivar'>@hidden_name</span>
|
2190
|
+
<span class='kw'>end</span></pre>
|
2191
|
+
</td>
|
2192
|
+
</tr>
|
2193
|
+
</table>
|
2194
|
+
</div>
|
2195
|
+
|
2196
|
+
<div class="method_details ">
|
2197
|
+
<p class="signature " id="hidden_value?-instance_method">
|
2198
|
+
|
2199
|
+
- (<tt><span class='object_link'><a href="Boolean.html" title="Sprout::Executable::Boolean (class)">Boolean</a></span></tt>) <strong>hidden_value?</strong>
|
2200
|
+
|
2201
|
+
|
2202
|
+
|
2203
|
+
</p><div class="docstring">
|
2204
|
+
<div class="discussion">
|
2205
|
+
|
2206
|
+
<p>Should the param value be hidden from the shell? Usually used for Boolean
|
2207
|
+
toggles like '-debug'</p>
|
2208
|
+
|
2209
|
+
|
2210
|
+
</div>
|
2211
|
+
</div>
|
2212
|
+
<div class="tags">
|
2213
|
+
<h3>Returns:</h3>
|
2214
|
+
<ul class="return">
|
2215
|
+
|
2216
|
+
<li>
|
2217
|
+
|
2218
|
+
<span class='type'>(<tt><span class='object_link'><a href="Boolean.html" title="Sprout::Executable::Boolean (class)">Boolean</a></span></tt>)</span>
|
2219
|
+
|
2220
|
+
|
2221
|
+
|
2222
|
+
|
2223
|
+
</li>
|
2224
|
+
|
2225
|
+
</ul>
|
2226
|
+
|
2227
|
+
</div><table class="source_code">
|
2228
|
+
<tr>
|
2229
|
+
<td>
|
2230
|
+
<pre class="lines">
|
2231
|
+
|
2232
|
+
|
2233
|
+
307
|
2234
|
+
308
|
2235
|
+
309</pre>
|
2236
|
+
</td>
|
2237
|
+
<td>
|
2238
|
+
<pre class="code"><span class="info file"># File 'lib/sprout/executable/param.rb', line 307</span>
|
2239
|
+
|
2240
|
+
<span class='kw'>def</span> <span class='id hidden_value?'>hidden_value?</span>
|
2241
|
+
<span class='ivar'>@hidden_value</span>
|
2242
|
+
<span class='kw'>end</span></pre>
|
2243
|
+
</td>
|
2244
|
+
</tr>
|
2245
|
+
</table>
|
2246
|
+
</div>
|
2247
|
+
|
2248
|
+
<div class="method_details ">
|
2249
|
+
<p class="signature " id="option_parser_declaration-instance_method">
|
2250
|
+
|
2251
|
+
- (<tt>Object</tt>) <strong>option_parser_declaration</strong>
|
2252
|
+
|
2253
|
+
|
2254
|
+
|
2255
|
+
</p><div class="docstring">
|
2256
|
+
<div class="discussion">
|
2257
|
+
|
2258
|
+
<p>How this parameter is provided to the Ruby OptionParser when being exposed
|
2259
|
+
as a Ruby Executable.</p>
|
2260
|
+
|
2261
|
+
|
2262
|
+
</div>
|
2263
|
+
</div>
|
2264
|
+
<div class="tags">
|
2265
|
+
|
2266
|
+
</div><table class="source_code">
|
2267
|
+
<tr>
|
2268
|
+
<td>
|
2269
|
+
<pre class="lines">
|
2270
|
+
|
2271
|
+
|
2272
|
+
327
|
2273
|
+
328
|
2274
|
+
329
|
2275
|
+
330
|
2276
|
+
331
|
2277
|
+
332
|
2278
|
+
333
|
2279
|
+
334
|
2280
|
+
335
|
2281
|
+
336
|
2282
|
+
337</pre>
|
2283
|
+
</td>
|
2284
|
+
<td>
|
2285
|
+
<pre class="code"><span class="info file"># File 'lib/sprout/executable/param.rb', line 327</span>
|
2286
|
+
|
2287
|
+
<span class='kw'>def</span> <span class='id option_parser_declaration'>option_parser_declaration</span>
|
2288
|
+
<span class='id declaration'>declaration</span> <span class='op'>=</span> <span class='id default_option_parser_declaration'>default_option_parser_declaration</span>
|
2289
|
+
<span class='comment'># TODO: Need to figure out how to support hidden name inputs...
|
2290
|
+
</span> <span class='comment'>#if(hidden_name?)
|
2291
|
+
</span> <span class='comment'>#declaration = [option_parser_type_output]
|
2292
|
+
</span> <span class='comment'>#
|
2293
|
+
</span> <span class='kw'>if</span><span class='lparen'>(</span><span class='op'>!</span><span class='id hidden_value?'>hidden_value?</span><span class='rparen'>)</span>
|
2294
|
+
<span class='id declaration'>declaration</span> <span class='op'><<</span> <span class='id delimiter'>delimiter</span> <span class='op'><<</span> <span class='id option_parser_type_output'>option_parser_type_output</span>
|
2295
|
+
<span class='kw'>end</span>
|
2296
|
+
<span class='id declaration'>declaration</span><span class='period'>.</span><span class='id join'>join</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
2297
|
+
<span class='kw'>end</span></pre>
|
2298
|
+
</td>
|
2299
|
+
</tr>
|
2300
|
+
</table>
|
2301
|
+
</div>
|
2302
|
+
|
2303
|
+
<div class="method_details ">
|
2304
|
+
<p class="signature " id="option_parser_name-instance_method">
|
2305
|
+
|
2306
|
+
- (<tt>Object</tt>) <strong>option_parser_name</strong> <span class="extras">(protected)</span>
|
2307
|
+
|
2308
|
+
|
2309
|
+
|
2310
|
+
</p><table class="source_code">
|
2311
|
+
<tr>
|
2312
|
+
<td>
|
2313
|
+
<pre class="lines">
|
2314
|
+
|
2315
|
+
|
2316
|
+
410
|
2317
|
+
411
|
2318
|
+
412</pre>
|
2319
|
+
</td>
|
2320
|
+
<td>
|
2321
|
+
<pre class="code"><span class="info file"># File 'lib/sprout/executable/param.rb', line 410</span>
|
2322
|
+
|
2323
|
+
<span class='kw'>def</span> <span class='id option_parser_name'>option_parser_name</span>
|
2324
|
+
<span class='id name'>name</span><span class='period'>.</span><span class='id to_s'>to_s</span><span class='period'>.</span><span class='id gsub'>gsub</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>_</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>-</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
2325
|
+
<span class='kw'>end</span></pre>
|
2326
|
+
</td>
|
2327
|
+
</tr>
|
2328
|
+
</table>
|
2329
|
+
</div>
|
2330
|
+
|
2331
|
+
<div class="method_details ">
|
2332
|
+
<p class="signature " id="option_parser_short_name-instance_method">
|
2333
|
+
|
2334
|
+
- (<tt>Object</tt>) <strong>option_parser_short_name</strong>
|
2335
|
+
|
2336
|
+
|
2337
|
+
|
2338
|
+
</p><div class="docstring">
|
2339
|
+
<div class="discussion">
|
2340
|
+
|
2341
|
+
<p>The Ruby OptionParser short name with prefix.</p>
|
2342
|
+
|
2343
|
+
|
2344
|
+
</div>
|
2345
|
+
</div>
|
2346
|
+
<div class="tags">
|
2347
|
+
|
2348
|
+
</div><table class="source_code">
|
2349
|
+
<tr>
|
2350
|
+
<td>
|
2351
|
+
<pre class="lines">
|
2352
|
+
|
2353
|
+
|
2354
|
+
345
|
2355
|
+
346
|
2356
|
+
347</pre>
|
2357
|
+
</td>
|
2358
|
+
<td>
|
2359
|
+
<pre class="code"><span class="info file"># File 'lib/sprout/executable/param.rb', line 345</span>
|
2360
|
+
|
2361
|
+
<span class='kw'>def</span> <span class='id option_parser_short_name'>option_parser_short_name</span>
|
2362
|
+
<span class='lbracket'>[</span> <span class='id short_prefix'>short_prefix</span><span class='comma'>,</span> <span class='id short_name'>short_name</span> <span class='rbracket'>]</span><span class='period'>.</span><span class='id join'>join</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
2363
|
+
<span class='kw'>end</span></pre>
|
2364
|
+
</td>
|
2365
|
+
</tr>
|
2366
|
+
</table>
|
2367
|
+
</div>
|
2368
|
+
|
2369
|
+
<div class="method_details ">
|
2370
|
+
<p class="signature " id="option_parser_type_name-instance_method">
|
2371
|
+
|
2372
|
+
- (<tt>Object</tt>) <strong>option_parser_type_name</strong> <span class="extras">(protected)</span>
|
2373
|
+
|
2374
|
+
|
2375
|
+
|
2376
|
+
</p><table class="source_code">
|
2377
|
+
<tr>
|
2378
|
+
<td>
|
2379
|
+
<pre class="lines">
|
2380
|
+
|
2381
|
+
|
2382
|
+
414
|
2383
|
+
415
|
2384
|
+
416</pre>
|
2385
|
+
</td>
|
2386
|
+
<td>
|
2387
|
+
<pre class="code"><span class="info file"># File 'lib/sprout/executable/param.rb', line 414</span>
|
2388
|
+
|
2389
|
+
<span class='kw'>def</span> <span class='id option_parser_type_name'>option_parser_type_name</span>
|
2390
|
+
<span class='ivar'>@option_parser_type_name</span>
|
2391
|
+
<span class='kw'>end</span></pre>
|
2392
|
+
</td>
|
2393
|
+
</tr>
|
2394
|
+
</table>
|
2395
|
+
</div>
|
2396
|
+
|
2397
|
+
<div class="method_details ">
|
2398
|
+
<p class="signature " id="option_parser_type_output-instance_method">
|
2399
|
+
|
2400
|
+
- (<tt>Object</tt>) <strong>option_parser_type_output</strong> <span class="extras">(protected)</span>
|
2401
|
+
|
2402
|
+
|
2403
|
+
|
2404
|
+
</p><table class="source_code">
|
2405
|
+
<tr>
|
2406
|
+
<td>
|
2407
|
+
<pre class="lines">
|
2408
|
+
|
2409
|
+
|
2410
|
+
418
|
2411
|
+
419
|
2412
|
+
420
|
2413
|
+
421</pre>
|
2414
|
+
</td>
|
2415
|
+
<td>
|
2416
|
+
<pre class="code"><span class="info file"># File 'lib/sprout/executable/param.rb', line 418</span>
|
2417
|
+
|
2418
|
+
<span class='kw'>def</span> <span class='id option_parser_type_output'>option_parser_type_output</span>
|
2419
|
+
<span class='id type'>type</span> <span class='op'>=</span> <span class='id hidden_value?'>hidden_value?</span> <span class='op'>?</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span> <span class='op'>:</span> <span class='id option_parser_type_name'>option_parser_type_name</span>
|
2420
|
+
<span class='id required?'>required?</span> <span class='op'>?</span> <span class='id type'>type</span> <span class='op'>:</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>[</span><span class='embexpr_beg'>#{</span><span class='id type'>type</span><span class='rbrace'>}</span><span class='tstring_content'>]</span><span class='tstring_end'>"</span></span>
|
2421
|
+
<span class='kw'>end</span></pre>
|
2422
|
+
</td>
|
2423
|
+
</tr>
|
2424
|
+
</table>
|
2425
|
+
</div>
|
2426
|
+
|
2427
|
+
<div class="method_details ">
|
2428
|
+
<p class="signature " id="prepare-instance_method">
|
2429
|
+
|
2430
|
+
- (<tt>Object</tt>) <strong>prepare</strong>
|
2431
|
+
|
2432
|
+
|
2433
|
+
|
2434
|
+
</p><div class="docstring">
|
2435
|
+
<div class="discussion">
|
2436
|
+
|
2437
|
+
<p>Prepare the parameter for execution or delegation, depending on what
|
2438
|
+
context we're in.</p>
|
2439
|
+
|
2440
|
+
|
2441
|
+
</div>
|
2442
|
+
</div>
|
2443
|
+
<div class="tags">
|
2444
|
+
|
2445
|
+
</div><table class="source_code">
|
2446
|
+
<tr>
|
2447
|
+
<td>
|
2448
|
+
<pre class="lines">
|
2449
|
+
|
2450
|
+
|
2451
|
+
286
|
2452
|
+
287
|
2453
|
+
288
|
2454
|
+
289</pre>
|
2455
|
+
</td>
|
2456
|
+
<td>
|
2457
|
+
<pre class="code"><span class="info file"># File 'lib/sprout/executable/param.rb', line 286</span>
|
2458
|
+
|
2459
|
+
<span class='kw'>def</span> <span class='id prepare'>prepare</span>
|
2460
|
+
<span class='id prepare_prerequisites'>prepare_prerequisites</span>
|
2461
|
+
<span class='ivar'>@prepared</span> <span class='op'>=</span> <span class='kw'>true</span>
|
2462
|
+
<span class='kw'>end</span></pre>
|
2463
|
+
</td>
|
2464
|
+
</tr>
|
2465
|
+
</table>
|
2466
|
+
</div>
|
2467
|
+
|
2468
|
+
<div class="method_details ">
|
2469
|
+
<p class="signature " id="prepare_prerequisites-instance_method">
|
2470
|
+
|
2471
|
+
- (<tt>Object</tt>) <strong>prepare_prerequisites</strong> <span class="extras">(protected)</span>
|
2472
|
+
|
2473
|
+
|
2474
|
+
|
2475
|
+
</p><table class="source_code">
|
2476
|
+
<tr>
|
2477
|
+
<td>
|
2478
|
+
<pre class="lines">
|
2479
|
+
|
2480
|
+
|
2481
|
+
423
|
2482
|
+
424</pre>
|
2483
|
+
</td>
|
2484
|
+
<td>
|
2485
|
+
<pre class="code"><span class="info file"># File 'lib/sprout/executable/param.rb', line 423</span>
|
2486
|
+
|
2487
|
+
<span class='kw'>def</span> <span class='id prepare_prerequisites'>prepare_prerequisites</span>
|
2488
|
+
<span class='kw'>end</span></pre>
|
2489
|
+
</td>
|
2490
|
+
</tr>
|
2491
|
+
</table>
|
2492
|
+
</div>
|
2493
|
+
|
2494
|
+
<div class="method_details ">
|
2495
|
+
<p class="signature " id="prepared?-instance_method">
|
2496
|
+
|
2497
|
+
- (<tt><span class='object_link'><a href="Boolean.html" title="Sprout::Executable::Boolean (class)">Boolean</a></span></tt>) <strong>prepared?</strong>
|
2498
|
+
|
2499
|
+
|
2500
|
+
|
2501
|
+
</p><div class="docstring">
|
2502
|
+
<div class="discussion">
|
2503
|
+
|
2504
|
+
<p>Returns true if this parameter has already been prepared.</p>
|
2505
|
+
|
2506
|
+
|
2507
|
+
</div>
|
2508
|
+
</div>
|
2509
|
+
<div class="tags">
|
2510
|
+
<h3>Returns:</h3>
|
2511
|
+
<ul class="return">
|
2512
|
+
|
2513
|
+
<li>
|
2514
|
+
|
2515
|
+
<span class='type'>(<tt><span class='object_link'><a href="Boolean.html" title="Sprout::Executable::Boolean (class)">Boolean</a></span></tt>)</span>
|
2516
|
+
|
2517
|
+
|
2518
|
+
|
2519
|
+
|
2520
|
+
</li>
|
2521
|
+
|
2522
|
+
</ul>
|
2523
|
+
|
2524
|
+
</div><table class="source_code">
|
2525
|
+
<tr>
|
2526
|
+
<td>
|
2527
|
+
<pre class="lines">
|
2528
|
+
|
2529
|
+
|
2530
|
+
293
|
2531
|
+
294
|
2532
|
+
295</pre>
|
2533
|
+
</td>
|
2534
|
+
<td>
|
2535
|
+
<pre class="code"><span class="info file"># File 'lib/sprout/executable/param.rb', line 293</span>
|
2536
|
+
|
2537
|
+
<span class='kw'>def</span> <span class='id prepared?'>prepared?</span>
|
2538
|
+
<span class='ivar'>@prepared</span>
|
2539
|
+
<span class='kw'>end</span></pre>
|
2540
|
+
</td>
|
2541
|
+
</tr>
|
2542
|
+
</table>
|
2543
|
+
</div>
|
2544
|
+
|
2545
|
+
<div class="method_details ">
|
2546
|
+
<p class="signature " id="required?-instance_method">
|
2547
|
+
|
2548
|
+
- (<tt><span class='object_link'><a href="Boolean.html" title="Sprout::Executable::Boolean (class)">Boolean</a></span></tt>) <strong>required?</strong>
|
2549
|
+
|
2550
|
+
|
2551
|
+
|
2552
|
+
</p><div class="docstring">
|
2553
|
+
<div class="discussion">
|
2554
|
+
|
2555
|
+
<p>Returns Boolean value if this parameter is required.</p>
|
2556
|
+
|
2557
|
+
|
2558
|
+
</div>
|
2559
|
+
</div>
|
2560
|
+
<div class="tags">
|
2561
|
+
<h3>Returns:</h3>
|
2562
|
+
<ul class="return">
|
2563
|
+
|
2564
|
+
<li>
|
2565
|
+
|
2566
|
+
<span class='type'>(<tt><span class='object_link'><a href="Boolean.html" title="Sprout::Executable::Boolean (class)">Boolean</a></span></tt>)</span>
|
2567
|
+
|
2568
|
+
|
2569
|
+
|
2570
|
+
|
2571
|
+
</li>
|
2572
|
+
|
2573
|
+
</ul>
|
2574
|
+
|
2575
|
+
</div><table class="source_code">
|
2576
|
+
<tr>
|
2577
|
+
<td>
|
2578
|
+
<pre class="lines">
|
2579
|
+
|
2580
|
+
|
2581
|
+
251
|
2582
|
+
252
|
2583
|
+
253</pre>
|
2584
|
+
</td>
|
2585
|
+
<td>
|
2586
|
+
<pre class="code"><span class="info file"># File 'lib/sprout/executable/param.rb', line 251</span>
|
2587
|
+
|
2588
|
+
<span class='kw'>def</span> <span class='id required?'>required?</span>
|
2589
|
+
<span class='lparen'>(</span><span class='id required'>required</span> <span class='op'>==</span> <span class='kw'>true</span><span class='rparen'>)</span>
|
2590
|
+
<span class='kw'>end</span></pre>
|
2591
|
+
</td>
|
2592
|
+
</tr>
|
2593
|
+
</table>
|
2594
|
+
</div>
|
2595
|
+
|
2596
|
+
<div class="method_details ">
|
2597
|
+
<p class="signature " id="shell_value-instance_method">
|
2598
|
+
|
2599
|
+
- (<tt>Object</tt>) <strong>shell_value</strong>
|
2600
|
+
|
2601
|
+
|
2602
|
+
|
2603
|
+
</p><div class="docstring">
|
2604
|
+
<div class="discussion">
|
2605
|
+
|
2606
|
+
<p>The String representation of the value in a format that is appropriate for
|
2607
|
+
the terminal.</p>
|
2608
|
+
|
2609
|
+
<p>For certain types of parameters, like File, spaces may be escaped on some
|
2610
|
+
platforms.</p>
|
2611
|
+
|
2612
|
+
|
2613
|
+
</div>
|
2614
|
+
</div>
|
2615
|
+
<div class="tags">
|
2616
|
+
|
2617
|
+
</div><table class="source_code">
|
2618
|
+
<tr>
|
2619
|
+
<td>
|
2620
|
+
<pre class="lines">
|
2621
|
+
|
2622
|
+
|
2623
|
+
367
|
2624
|
+
368
|
2625
|
+
369</pre>
|
2626
|
+
</td>
|
2627
|
+
<td>
|
2628
|
+
<pre class="code"><span class="info file"># File 'lib/sprout/executable/param.rb', line 367</span>
|
2629
|
+
|
2630
|
+
<span class='kw'>def</span> <span class='id shell_value'>shell_value</span>
|
2631
|
+
<span class='id value'>value</span><span class='period'>.</span><span class='id to_s'>to_s</span>
|
2632
|
+
<span class='kw'>end</span></pre>
|
2633
|
+
</td>
|
2634
|
+
</tr>
|
2635
|
+
</table>
|
2636
|
+
</div>
|
2637
|
+
|
2638
|
+
<div class="method_details ">
|
2639
|
+
<p class="signature " id="short_prefix-instance_method">
|
2640
|
+
|
2641
|
+
- (<tt>Object</tt>) <strong>short_prefix</strong>
|
2642
|
+
|
2643
|
+
|
2644
|
+
|
2645
|
+
</p><table class="source_code">
|
2646
|
+
<tr>
|
2647
|
+
<td>
|
2648
|
+
<pre class="lines">
|
2649
|
+
|
2650
|
+
|
2651
|
+
320
|
2652
|
+
321
|
2653
|
+
322</pre>
|
2654
|
+
</td>
|
2655
|
+
<td>
|
2656
|
+
<pre class="code"><span class="info file"># File 'lib/sprout/executable/param.rb', line 320</span>
|
2657
|
+
|
2658
|
+
<span class='kw'>def</span> <span class='id short_prefix'>short_prefix</span>
|
2659
|
+
<span class='ivar'>@short_prefix</span> <span class='op'>||=</span> <span class='lparen'>(</span><span class='id belongs_to'>belongs_to</span><span class='period'>.</span><span class='id nil?'>nil?</span><span class='rparen'>)</span> <span class='op'>?</span> <span class='const'>DEFAULT_SHORT_PREFIX</span> <span class='op'>:</span> <span class='id belongs_to'>belongs_to</span><span class='period'>.</span><span class='id default_short_prefix'>default_short_prefix</span>
|
2660
|
+
<span class='kw'>end</span></pre>
|
2661
|
+
</td>
|
2662
|
+
</tr>
|
2663
|
+
</table>
|
2664
|
+
</div>
|
2665
|
+
|
2666
|
+
<div class="method_details ">
|
2667
|
+
<p class="signature " id="to_rdoc-instance_method">
|
2668
|
+
|
2669
|
+
- (<tt>Object</tt>) <strong>to_rdoc</strong>
|
2670
|
+
|
2671
|
+
|
2672
|
+
|
2673
|
+
</p><div class="docstring">
|
2674
|
+
<div class="discussion">
|
2675
|
+
|
2676
|
+
<p>Create a string that can be turned into a file that rdoc can parse to
|
2677
|
+
describe the customized or generated task using param name, type and
|
2678
|
+
description</p>
|
2679
|
+
|
2680
|
+
|
2681
|
+
</div>
|
2682
|
+
</div>
|
2683
|
+
<div class="tags">
|
2684
|
+
|
2685
|
+
</div><table class="source_code">
|
2686
|
+
<tr>
|
2687
|
+
<td>
|
2688
|
+
<pre class="lines">
|
2689
|
+
|
2690
|
+
|
2691
|
+
400
|
2692
|
+
401
|
2693
|
+
402
|
2694
|
+
403
|
2695
|
+
404
|
2696
|
+
405
|
2697
|
+
406</pre>
|
2698
|
+
</td>
|
2699
|
+
<td>
|
2700
|
+
<pre class="code"><span class="info file"># File 'lib/sprout/executable/param.rb', line 400</span>
|
2701
|
+
|
2702
|
+
<span class='kw'>def</span> <span class='id to_rdoc'>to_rdoc</span>
|
2703
|
+
<span class='id result'>result</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span>
|
2704
|
+
<span class='id parts'>parts</span> <span class='op'>=</span> <span class='id description'>description</span><span class='period'>.</span><span class='id split'>split</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\n</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='id description'>description</span><span class='period'>.</span><span class='id nil?'>nil?</span>
|
2705
|
+
<span class='id result'>result</span> <span class='op'><<</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'># </span><span class='embexpr_beg'>#{</span><span class='id parts'>parts</span><span class='period'>.</span><span class='id join'>join</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\n# </span><span class='tstring_end'>"</span></span><span class='rparen'>)</span><span class='rbrace'>}</span><span class='tstring_content'>\n</span><span class='tstring_end'>"</span></span> <span class='kw'>unless</span> <span class='id description'>description</span><span class='period'>.</span><span class='id nil?'>nil?</span>
|
2706
|
+
<span class='id result'>result</span> <span class='op'><<</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>def </span><span class='embexpr_beg'>#{</span><span class='id name'>name</span><span class='rbrace'>}</span><span class='tstring_content'>=(</span><span class='embexpr_beg'>#{</span><span class='id type'>type</span><span class='rbrace'>}</span><span class='tstring_content'>)\n @</span><span class='embexpr_beg'>#{</span><span class='id name'>name</span><span class='rbrace'>}</span><span class='tstring_content'> = </span><span class='embexpr_beg'>#{</span><span class='id type'>type</span><span class='rbrace'>}</span><span class='tstring_content'>\nend\n\n</span><span class='tstring_end'>"</span></span>
|
2707
|
+
<span class='kw'>return</span> <span class='id result'>result</span>
|
2708
|
+
<span class='kw'>end</span></pre>
|
2709
|
+
</td>
|
2710
|
+
</tr>
|
2711
|
+
</table>
|
2712
|
+
</div>
|
2713
|
+
|
2714
|
+
<div class="method_details ">
|
2715
|
+
<p class="signature " id="to_shell-instance_method">
|
2716
|
+
|
2717
|
+
- (<tt>Object</tt>) <strong>to_shell</strong>
|
2718
|
+
|
2719
|
+
|
2720
|
+
|
2721
|
+
</p><div class="docstring">
|
2722
|
+
<div class="discussion">
|
2723
|
+
|
2724
|
+
<p>Prepare and serialize this parameter to a string that is appropriate for
|
2725
|
+
shell execution on the current platform.</p>
|
2726
|
+
|
2727
|
+
<p>Calling <tt>to_shell</tt> will first trigger a call to the <tt>prepare</tt>
|
2728
|
+
template method unless <tt>prepared?</tt> returns <tt>true</tt>.</p>
|
2729
|
+
|
2730
|
+
|
2731
|
+
</div>
|
2732
|
+
</div>
|
2733
|
+
<div class="tags">
|
2734
|
+
|
2735
|
+
</div><table class="source_code">
|
2736
|
+
<tr>
|
2737
|
+
<td>
|
2738
|
+
<pre class="lines">
|
2739
|
+
|
2740
|
+
|
2741
|
+
386
|
2742
|
+
387
|
2743
|
+
388
|
2744
|
+
389
|
2745
|
+
390
|
2746
|
+
391
|
2747
|
+
392
|
2748
|
+
393
|
2749
|
+
394</pre>
|
2750
|
+
</td>
|
2751
|
+
<td>
|
2752
|
+
<pre class="code"><span class="info file"># File 'lib/sprout/executable/param.rb', line 386</span>
|
2753
|
+
|
2754
|
+
<span class='kw'>def</span> <span class='id to_shell'>to_shell</span>
|
2755
|
+
<span class='id prepare'>prepare</span> <span class='kw'>if</span> <span class='op'>!</span><span class='id prepared?'>prepared?</span>
|
2756
|
+
<span class='id validate'>validate</span>
|
2757
|
+
<span class='kw'>return</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span> <span class='kw'>if</span> <span class='op'>!</span><span class='id visible?'>visible?</span>
|
2758
|
+
<span class='kw'>return</span> <span class='ivar'>@to_shell_proc</span><span class='period'>.</span><span class='id call'>call</span><span class='lparen'>(</span><span class='kw'>self</span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='ivar'>@to_shell_proc</span><span class='period'>.</span><span class='id nil?'>nil?</span>
|
2759
|
+
<span class='kw'>return</span> <span class='id shell_value'>shell_value</span> <span class='kw'>if</span> <span class='id hidden_name?'>hidden_name?</span>
|
2760
|
+
<span class='kw'>return</span> <span class='id shell_name'>shell_name</span> <span class='kw'>if</span> <span class='id hidden_value?'>hidden_value?</span>
|
2761
|
+
<span class='kw'>return</span> <span class='lbracket'>[</span><span class='id shell_name'>shell_name</span><span class='comma'>,</span> <span class='id delimiter'>delimiter</span><span class='comma'>,</span> <span class='id shell_value'>shell_value</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id join'>join</span>
|
2762
|
+
<span class='kw'>end</span></pre>
|
2763
|
+
</td>
|
2764
|
+
</tr>
|
2765
|
+
</table>
|
2766
|
+
</div>
|
2767
|
+
|
2768
|
+
<div class="method_details ">
|
2769
|
+
<p class="signature " id="validate-instance_method">
|
2770
|
+
|
2771
|
+
- (<tt>Object</tt>) <strong>validate</strong>
|
2772
|
+
|
2773
|
+
|
2774
|
+
|
2775
|
+
</p><div class="docstring">
|
2776
|
+
<div class="discussion">
|
2777
|
+
|
2778
|
+
<p>Ensure this parameter is in a valid state, raise a
|
2779
|
+
Sprout::Errors::MissingArgumentError if it is not.</p>
|
2780
|
+
|
2781
|
+
|
2782
|
+
</div>
|
2783
|
+
</div>
|
2784
|
+
<div class="tags">
|
2785
|
+
|
2786
|
+
</div><table class="source_code">
|
2787
|
+
<tr>
|
2788
|
+
<td>
|
2789
|
+
<pre class="lines">
|
2790
|
+
|
2791
|
+
|
2792
|
+
258
|
2793
|
+
259
|
2794
|
+
260
|
2795
|
+
261
|
2796
|
+
262</pre>
|
2797
|
+
</td>
|
2798
|
+
<td>
|
2799
|
+
<pre class="code"><span class="info file"># File 'lib/sprout/executable/param.rb', line 258</span>
|
2800
|
+
|
2801
|
+
<span class='kw'>def</span> <span class='id validate'>validate</span>
|
2802
|
+
<span class='kw'>if</span><span class='lparen'>(</span><span class='id required?'>required?</span> <span class='op'>&&</span> <span class='id value'>value</span><span class='period'>.</span><span class='id nil?'>nil?</span><span class='rparen'>)</span>
|
2803
|
+
<span class='id raise'>raise</span> <span class='const'>Sprout</span><span class='op'>::</span><span class='const'>Errors</span><span class='op'>::</span><span class='const'>MissingArgumentError</span><span class='period'>.</span><span class='id new'>new</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id name'>name</span><span class='rbrace'>}</span><span class='tstring_content'> is required and must not be nil</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
2804
|
+
<span class='kw'>end</span>
|
2805
|
+
<span class='kw'>end</span></pre>
|
2806
|
+
</td>
|
2807
|
+
</tr>
|
2808
|
+
</table>
|
2809
|
+
</div>
|
2810
|
+
|
2811
|
+
<div class="method_details ">
|
2812
|
+
<p class="signature " id="visible?-instance_method">
|
2813
|
+
|
2814
|
+
- (<tt><span class='object_link'><a href="Boolean.html" title="Sprout::Executable::Boolean (class)">Boolean</a></span></tt>) <strong>visible?</strong>
|
2815
|
+
|
2816
|
+
|
2817
|
+
|
2818
|
+
</p><div class="docstring">
|
2819
|
+
<div class="discussion">
|
2820
|
+
|
2821
|
+
<p>By default, Executable::Params only appear in the shell output when they
|
2822
|
+
are not nil</p>
|
2823
|
+
|
2824
|
+
|
2825
|
+
</div>
|
2826
|
+
</div>
|
2827
|
+
<div class="tags">
|
2828
|
+
<h3>Returns:</h3>
|
2829
|
+
<ul class="return">
|
2830
|
+
|
2831
|
+
<li>
|
2832
|
+
|
2833
|
+
<span class='type'>(<tt><span class='object_link'><a href="Boolean.html" title="Sprout::Executable::Boolean (class)">Boolean</a></span></tt>)</span>
|
2834
|
+
|
2835
|
+
|
2836
|
+
|
2837
|
+
|
2838
|
+
</li>
|
2839
|
+
|
2840
|
+
</ul>
|
2841
|
+
|
2842
|
+
</div><table class="source_code">
|
2843
|
+
<tr>
|
2844
|
+
<td>
|
2845
|
+
<pre class="lines">
|
2846
|
+
|
2847
|
+
|
2848
|
+
245
|
2849
|
+
246
|
2850
|
+
247</pre>
|
2851
|
+
</td>
|
2852
|
+
<td>
|
2853
|
+
<pre class="code"><span class="info file"># File 'lib/sprout/executable/param.rb', line 245</span>
|
2854
|
+
|
2855
|
+
<span class='kw'>def</span> <span class='id visible?'>visible?</span>
|
2856
|
+
<span class='op'>!</span><span class='id value'>value</span><span class='period'>.</span><span class='id nil?'>nil?</span>
|
2857
|
+
<span class='kw'>end</span></pre>
|
2858
|
+
</td>
|
2859
|
+
</tr>
|
2860
|
+
</table>
|
2861
|
+
</div>
|
2862
|
+
|
2863
|
+
</div>
|
2864
|
+
|
2865
|
+
</div>
|
2866
|
+
|
2867
|
+
<div id="footer">
|
2868
|
+
Generated on Fri Apr 29 18:33:07 2011 by
|
2869
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
2870
|
+
0.6.3 (ruby-1.9.2).
|
2871
|
+
</div>
|
2872
|
+
|
2873
|
+
</body>
|
2874
|
+
</html>
|