sprout 1.1.11.pre → 1.1.13.pre

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of sprout might be problematic. Click here for more details.

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