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