sprout 1.0.11.pre → 1.0.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 (149) hide show
  1. data/lib/sprout/executable.rb +37 -10
  2. data/lib/sprout/generator/base.rb +17 -0
  3. data/lib/sprout/ruby_feature.rb +1 -1
  4. data/lib/sprout/version.rb +1 -1
  5. data/rdoc/<.html +274 -0
  6. data/rdoc/Dir.html +387 -0
  7. data/rdoc/Object.html +344 -0
  8. data/rdoc/Sprout.html +440 -0
  9. data/rdoc/Sprout/ArchiveUnpacker.html +1045 -0
  10. data/rdoc/Sprout/Base.html +283 -0
  11. data/rdoc/Sprout/Base/ClassMethods.html +474 -0
  12. data/rdoc/Sprout/Concern.html +415 -0
  13. data/rdoc/Sprout/Errors.html +324 -0
  14. data/rdoc/Sprout/Errors/ArchiveUnpackerError.html +284 -0
  15. data/rdoc/Sprout/Errors/DestinationExistsError.html +286 -0
  16. data/rdoc/Sprout/Errors/DuplicateMemberError.html +284 -0
  17. data/rdoc/Sprout/Errors/ExecutableError.html +285 -0
  18. data/rdoc/Sprout/Errors/ExecutableRegistrationError.html +284 -0
  19. data/rdoc/Sprout/Errors/ExecutionError.html +284 -0
  20. data/rdoc/Sprout/Errors/GeneratorError.html +284 -0
  21. data/rdoc/Sprout/Errors/InvalidArgumentError.html +284 -0
  22. data/rdoc/Sprout/Errors/LoadError.html +284 -0
  23. data/rdoc/Sprout/Errors/MissingArgumentError.html +284 -0
  24. data/rdoc/Sprout/Errors/MissingExecutableError.html +284 -0
  25. data/rdoc/Sprout/Errors/MissingGeneratorError.html +285 -0
  26. data/rdoc/Sprout/Errors/MissingTemplateError.html +285 -0
  27. data/rdoc/Sprout/Errors/ProcessRunnerError.html +284 -0
  28. data/rdoc/Sprout/Errors/RemoteFileLoaderError.html +284 -0
  29. data/rdoc/Sprout/Errors/SproutError.html +284 -0
  30. data/rdoc/Sprout/Errors/UnknownArchiveType.html +285 -0
  31. data/rdoc/Sprout/Errors/UsageError.html +284 -0
  32. data/rdoc/Sprout/Errors/ValidationError.html +284 -0
  33. data/rdoc/Sprout/Errors/VersionRequirementNotMetError.html +284 -0
  34. data/rdoc/Sprout/Executable.html +549 -0
  35. data/rdoc/Sprout/Executable/Boolean.html +445 -0
  36. data/rdoc/Sprout/Executable/ClassMethods.html +713 -0
  37. data/rdoc/Sprout/Executable/CollectionParam.html +501 -0
  38. data/rdoc/Sprout/Executable/FileParam.html +512 -0
  39. data/rdoc/Sprout/Executable/Files.html +385 -0
  40. data/rdoc/Sprout/Executable/InstanceMethods.html +1597 -0
  41. data/rdoc/Sprout/Executable/Number.html +284 -0
  42. data/rdoc/Sprout/Executable/Param.html +1660 -0
  43. data/rdoc/Sprout/Executable/ParameterFactory.html +345 -0
  44. data/rdoc/Sprout/Executable/Path.html +339 -0
  45. data/rdoc/Sprout/Executable/Paths.html +339 -0
  46. data/rdoc/Sprout/Executable/StringParam.html +333 -0
  47. data/rdoc/Sprout/Executable/Strings.html +295 -0
  48. data/rdoc/Sprout/Executable/Url.html +284 -0
  49. data/rdoc/Sprout/Executable/Urls.html +284 -0
  50. data/rdoc/Sprout/FileTarget.html +660 -0
  51. data/rdoc/Sprout/Generator.html +643 -0
  52. data/rdoc/Sprout/Generator/Base.html +1143 -0
  53. data/rdoc/Sprout/Generator/Command.html +604 -0
  54. data/rdoc/Sprout/Generator/DirectoryManifest.html +561 -0
  55. data/rdoc/Sprout/Generator/FileManifest.html +545 -0
  56. data/rdoc/Sprout/Generator/Manifest.html +387 -0
  57. data/rdoc/Sprout/Generator/TemplateManifest.html +331 -0
  58. data/rdoc/Sprout/GeneratorGenerator.html +358 -0
  59. data/rdoc/Sprout/Library.html +646 -0
  60. data/rdoc/Sprout/LibraryGenerator.html +368 -0
  61. data/rdoc/Sprout/Log.html +281 -0
  62. data/rdoc/Sprout/Platform.html +610 -0
  63. data/rdoc/Sprout/ProcessRunner.html +1145 -0
  64. data/rdoc/Sprout/ProgressBar.html +281 -0
  65. data/rdoc/Sprout/ProgressBarImpl.html +281 -0
  66. data/rdoc/Sprout/ProgressBarManager.html +281 -0
  67. data/rdoc/Sprout/ProgressBarOutputStream.html +281 -0
  68. data/rdoc/Sprout/RDocParser.html +702 -0
  69. data/rdoc/Sprout/RemoteFileLoader.html +537 -0
  70. data/rdoc/Sprout/RemoteFileTarget.html +741 -0
  71. data/rdoc/Sprout/ReversedProgressBar.html +281 -0
  72. data/rdoc/Sprout/RubyFeature.html +324 -0
  73. data/rdoc/Sprout/RubyFeature/ClassMethods.html +821 -0
  74. data/rdoc/Sprout/RubyGenerator.html +576 -0
  75. data/rdoc/Sprout/Specification.html +915 -0
  76. data/rdoc/Sprout/System.html +383 -0
  77. data/rdoc/Sprout/System/BaseSystem.html +1173 -0
  78. data/rdoc/Sprout/System/JavaSystem.html +284 -0
  79. data/rdoc/Sprout/System/OSXSystem.html +419 -0
  80. data/rdoc/Sprout/System/ThreadMock.html +281 -0
  81. data/rdoc/Sprout/System/UnixSystem.html +583 -0
  82. data/rdoc/Sprout/System/VistaSystem.html +367 -0
  83. data/rdoc/Sprout/System/WinNixSystem.html +417 -0
  84. data/rdoc/Sprout/System/WinSystem.html +672 -0
  85. data/rdoc/Sprout/ToolGenerator.html +376 -0
  86. data/rdoc/Sprout/VERSION.html +274 -0
  87. data/rdoc/SproutTestCase.html +279 -0
  88. data/rdoc/String.html +411 -0
  89. data/rdoc/created.rid +61 -0
  90. data/rdoc/index.html +795 -0
  91. data/rdoc/lib/sprout/archive_unpacker_rb.html +56 -0
  92. data/rdoc/lib/sprout/base_rb.html +111 -0
  93. data/rdoc/lib/sprout/concern_rb.html +52 -0
  94. data/rdoc/lib/sprout/dir_rb.html +52 -0
  95. data/rdoc/lib/sprout/errors_rb.html +52 -0
  96. data/rdoc/lib/sprout/executable/boolean_rb.html +52 -0
  97. data/rdoc/lib/sprout/executable/collection_param_rb.html +52 -0
  98. data/rdoc/lib/sprout/executable/file_param_rb.html +52 -0
  99. data/rdoc/lib/sprout/executable/files_rb.html +52 -0
  100. data/rdoc/lib/sprout/executable/number_rb.html +52 -0
  101. data/rdoc/lib/sprout/executable/param_rb.html +52 -0
  102. data/rdoc/lib/sprout/executable/parameter_factory_rb.html +52 -0
  103. data/rdoc/lib/sprout/executable/path_rb.html +52 -0
  104. data/rdoc/lib/sprout/executable/paths_rb.html +52 -0
  105. data/rdoc/lib/sprout/executable/string_param_rb.html +52 -0
  106. data/rdoc/lib/sprout/executable/strings_rb.html +52 -0
  107. data/rdoc/lib/sprout/executable/url_rb.html +52 -0
  108. data/rdoc/lib/sprout/executable/urls_rb.html +52 -0
  109. data/rdoc/lib/sprout/executable_rb.html +78 -0
  110. data/rdoc/lib/sprout/file_target_rb.html +52 -0
  111. data/rdoc/lib/sprout/generator/base_rb.html +54 -0
  112. data/rdoc/lib/sprout/generator/command_rb.html +52 -0
  113. data/rdoc/lib/sprout/generator/directory_manifest_rb.html +52 -0
  114. data/rdoc/lib/sprout/generator/file_manifest_rb.html +52 -0
  115. data/rdoc/lib/sprout/generator/manifest_rb.html +52 -0
  116. data/rdoc/lib/sprout/generator/template_manifest_rb.html +52 -0
  117. data/rdoc/lib/sprout/generators/generator/generator_generator_rb.html +52 -0
  118. data/rdoc/lib/sprout/generators/generator/templates/generator_test_helper_rb.html +64 -0
  119. data/rdoc/lib/sprout/generators/library/library_generator_rb.html +52 -0
  120. data/rdoc/lib/sprout/generators/ruby/ruby_generator_rb.html +52 -0
  121. data/rdoc/lib/sprout/generators/ruby/templates/ruby_base_rb.html +54 -0
  122. data/rdoc/lib/sprout/generators/tool/tool_generator_rb.html +52 -0
  123. data/rdoc/lib/sprout/library_rb.html +52 -0
  124. data/rdoc/lib/sprout/log_rb.html +52 -0
  125. data/rdoc/lib/sprout/platform_rb.html +52 -0
  126. data/rdoc/lib/sprout/process_runner_rb.html +58 -0
  127. data/rdoc/lib/sprout/progress_bar_rb.html +72 -0
  128. data/rdoc/lib/sprout/rdoc_parser_rb.html +54 -0
  129. data/rdoc/lib/sprout/remote_file_loader_rb.html +54 -0
  130. data/rdoc/lib/sprout/remote_file_target_rb.html +52 -0
  131. data/rdoc/lib/sprout/ruby_feature_rb.html +52 -0
  132. data/rdoc/lib/sprout/specification_rb.html +52 -0
  133. data/rdoc/lib/sprout/string_rb.html +52 -0
  134. data/rdoc/lib/sprout/system/base_system_rb.html +52 -0
  135. data/rdoc/lib/sprout/system/java_system_rb.html +52 -0
  136. data/rdoc/lib/sprout/system/osx_system_rb.html +52 -0
  137. data/rdoc/lib/sprout/system/unix_system_rb.html +52 -0
  138. data/rdoc/lib/sprout/system/vista_system_rb.html +52 -0
  139. data/rdoc/lib/sprout/system/win_nix_system_rb.html +52 -0
  140. data/rdoc/lib/sprout/system/win_system_rb.html +52 -0
  141. data/rdoc/lib/sprout/system_rb.html +66 -0
  142. data/rdoc/lib/sprout/test/sprout_test_case_rb.html +57 -0
  143. data/rdoc/lib/sprout/version_rb.html +52 -0
  144. data/rdoc/lib/sprout_rb.html +54 -0
  145. data/rdoc/rdoc.css +706 -0
  146. data/test/fixtures/executable/mxmlc.rb +2 -2
  147. data/test/unit/executable_test.rb +13 -0
  148. data/test/unit/generator_test.rb +25 -2
  149. metadata +144 -3
@@ -0,0 +1,549 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
+ <head>
6
+ <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
7
+
8
+ <title>Module: Sprout::Executable</title>
9
+
10
+ <link rel="stylesheet" href="../rdoc.css" type="text/css" media="screen" />
11
+
12
+ <script src="../js/jquery.js" type="text/javascript"
13
+ charset="utf-8"></script>
14
+ <script src="../js/thickbox-compressed.js" type="text/javascript"
15
+ charset="utf-8"></script>
16
+ <script src="../js/quicksearch.js" type="text/javascript"
17
+ charset="utf-8"></script>
18
+ <script src="../js/darkfish.js" type="text/javascript"
19
+ charset="utf-8"></script>
20
+
21
+ </head>
22
+ <body class="module">
23
+
24
+ <div id="metadata">
25
+ <div id="home-metadata">
26
+ <div id="home-section" class="section">
27
+ <h3 class="section-header">
28
+ <a href="../index.html">Home</a>
29
+ <a href="../index.html#classes">Classes</a>
30
+ <a href="../index.html#methods">Methods</a>
31
+ </h3>
32
+ </div>
33
+ </div>
34
+
35
+ <div id="file-metadata">
36
+ <div id="file-list-section" class="section">
37
+ <h3 class="section-header">In Files</h3>
38
+ <div class="section-body">
39
+ <ul>
40
+
41
+ <li><a href="../lib/sprout/executable/boolean_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
42
+ class="thickbox" title="lib/sprout/executable/boolean.rb">lib/sprout/executable/boolean.rb</a></li>
43
+
44
+ <li><a href="../lib/sprout/executable/collection_param_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
45
+ class="thickbox" title="lib/sprout/executable/collection_param.rb">lib/sprout/executable/collection_param.rb</a></li>
46
+
47
+ <li><a href="../lib/sprout/executable/file_param_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
48
+ class="thickbox" title="lib/sprout/executable/file_param.rb">lib/sprout/executable/file_param.rb</a></li>
49
+
50
+ <li><a href="../lib/sprout/executable/files_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
51
+ class="thickbox" title="lib/sprout/executable/files.rb">lib/sprout/executable/files.rb</a></li>
52
+
53
+ <li><a href="../lib/sprout/executable/number_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
54
+ class="thickbox" title="lib/sprout/executable/number.rb">lib/sprout/executable/number.rb</a></li>
55
+
56
+ <li><a href="../lib/sprout/executable/param_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
57
+ class="thickbox" title="lib/sprout/executable/param.rb">lib/sprout/executable/param.rb</a></li>
58
+
59
+ <li><a href="../lib/sprout/executable/parameter_factory_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
60
+ class="thickbox" title="lib/sprout/executable/parameter_factory.rb">lib/sprout/executable/parameter_factory.rb</a></li>
61
+
62
+ <li><a href="../lib/sprout/executable/path_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
63
+ class="thickbox" title="lib/sprout/executable/path.rb">lib/sprout/executable/path.rb</a></li>
64
+
65
+ <li><a href="../lib/sprout/executable/paths_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
66
+ class="thickbox" title="lib/sprout/executable/paths.rb">lib/sprout/executable/paths.rb</a></li>
67
+
68
+ <li><a href="../lib/sprout/executable/string_param_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
69
+ class="thickbox" title="lib/sprout/executable/string_param.rb">lib/sprout/executable/string_param.rb</a></li>
70
+
71
+ <li><a href="../lib/sprout/executable/strings_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
72
+ class="thickbox" title="lib/sprout/executable/strings.rb">lib/sprout/executable/strings.rb</a></li>
73
+
74
+ <li><a href="../lib/sprout/executable/url_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
75
+ class="thickbox" title="lib/sprout/executable/url.rb">lib/sprout/executable/url.rb</a></li>
76
+
77
+ <li><a href="../lib/sprout/executable/urls_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
78
+ class="thickbox" title="lib/sprout/executable/urls.rb">lib/sprout/executable/urls.rb</a></li>
79
+
80
+ <li><a href="../lib/sprout/executable_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
81
+ class="thickbox" title="lib/sprout/executable.rb">lib/sprout/executable.rb</a></li>
82
+
83
+ </ul>
84
+ </div>
85
+ </div>
86
+
87
+
88
+ </div>
89
+
90
+ <div id="class-metadata">
91
+
92
+ <!-- Parent Class -->
93
+
94
+
95
+ <!-- Namespace Contents -->
96
+
97
+ <div id="namespace-list-section" class="section">
98
+ <h3 class="section-header">Namespace</h3>
99
+ <ul class="link-list">
100
+
101
+ <li><span class="type">MODULE</span> <a href="Executable/ClassMethods.html">Sprout::Executable::ClassMethods</a></li>
102
+
103
+ <li><span class="type">MODULE</span> <a href="Executable/CollectionParam.html">Sprout::Executable::CollectionParam</a></li>
104
+
105
+ <li><span class="type">MODULE</span> <a href="Executable/InstanceMethods.html">Sprout::Executable::InstanceMethods</a></li>
106
+
107
+ <li><span class="type">CLASS</span> <a href="Executable/Boolean.html">Sprout::Executable::Boolean</a></li>
108
+
109
+ <li><span class="type">CLASS</span> <a href="Executable/FileParam.html">Sprout::Executable::FileParam</a></li>
110
+
111
+ <li><span class="type">CLASS</span> <a href="Executable/Files.html">Sprout::Executable::Files</a></li>
112
+
113
+ <li><span class="type">CLASS</span> <a href="Executable/Number.html">Sprout::Executable::Number</a></li>
114
+
115
+ <li><span class="type">CLASS</span> <a href="Executable/Param.html">Sprout::Executable::Param</a></li>
116
+
117
+ <li><span class="type">CLASS</span> <a href="Executable/ParameterFactory.html">Sprout::Executable::ParameterFactory</a></li>
118
+
119
+ <li><span class="type">CLASS</span> <a href="Executable/Path.html">Sprout::Executable::Path</a></li>
120
+
121
+ <li><span class="type">CLASS</span> <a href="Executable/Paths.html">Sprout::Executable::Paths</a></li>
122
+
123
+ <li><span class="type">CLASS</span> <a href="Executable/StringParam.html">Sprout::Executable::StringParam</a></li>
124
+
125
+ <li><span class="type">CLASS</span> <a href="Executable/Strings.html">Sprout::Executable::Strings</a></li>
126
+
127
+ <li><span class="type">CLASS</span> <a href="Executable/Url.html">Sprout::Executable::Url</a></li>
128
+
129
+ <li><span class="type">CLASS</span> <a href="Executable/Urls.html">Sprout::Executable::Urls</a></li>
130
+
131
+ </ul>
132
+ </div>
133
+
134
+
135
+ <!-- Method Quickref -->
136
+
137
+
138
+ <!-- Included Modules -->
139
+
140
+ <div id="includes-section" class="section">
141
+ <h3 class="section-header">Included Modules</h3>
142
+ <ul class="link-list">
143
+
144
+
145
+ <li><span class="include">RubyFeature</span></li>
146
+
147
+
148
+ </ul>
149
+ </div>
150
+
151
+ </div>
152
+
153
+ <div id="project-metadata">
154
+
155
+
156
+
157
+ <div id="classindex-section" class="section project-section">
158
+ <h3 class="section-header">Class Index
159
+ <span class="search-toggle"><img src="../images/find.png"
160
+ height="16" width="16" alt="[+]"
161
+ title="show/hide quicksearch" /></span></h3>
162
+ <form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
163
+ <fieldset>
164
+ <legend>Quicksearch</legend>
165
+ <input type="text" name="quicksearch" value=""
166
+ class="quicksearch-field" />
167
+ </fieldset>
168
+ </form>
169
+
170
+ <ul class="link-list">
171
+
172
+ <li><a href="../Sprout/ArchiveUnpacker.html">Sprout::ArchiveUnpacker</a></li>
173
+
174
+ <li><a href="../Sprout/Base.html">Sprout::Base</a></li>
175
+
176
+ <li><a href="../Sprout/Base/ClassMethods.html">Sprout::Base::ClassMethods</a></li>
177
+
178
+ <li><a href="../Sprout/Concern.html">Sprout::Concern</a></li>
179
+
180
+ <li><a href="../Sprout/Errors.html">Sprout::Errors</a></li>
181
+
182
+ <li><a href="../Sprout/Errors/ArchiveUnpackerError.html">Sprout::Errors::ArchiveUnpackerError</a></li>
183
+
184
+ <li><a href="../Sprout/Errors/DestinationExistsError.html">Sprout::Errors::DestinationExistsError</a></li>
185
+
186
+ <li><a href="../Sprout/Errors/DuplicateMemberError.html">Sprout::Errors::DuplicateMemberError</a></li>
187
+
188
+ <li><a href="../Sprout/Errors/ExecutableError.html">Sprout::Errors::ExecutableError</a></li>
189
+
190
+ <li><a href="../Sprout/Errors/ExecutableRegistrationError.html">Sprout::Errors::ExecutableRegistrationError</a></li>
191
+
192
+ <li><a href="../Sprout/Errors/ExecutionError.html">Sprout::Errors::ExecutionError</a></li>
193
+
194
+ <li><a href="../Sprout/Errors/GeneratorError.html">Sprout::Errors::GeneratorError</a></li>
195
+
196
+ <li><a href="../Sprout/Errors/InvalidArgumentError.html">Sprout::Errors::InvalidArgumentError</a></li>
197
+
198
+ <li><a href="../Sprout/Errors/LoadError.html">Sprout::Errors::LoadError</a></li>
199
+
200
+ <li><a href="../Sprout/Errors/MissingArgumentError.html">Sprout::Errors::MissingArgumentError</a></li>
201
+
202
+ <li><a href="../Sprout/Errors/MissingExecutableError.html">Sprout::Errors::MissingExecutableError</a></li>
203
+
204
+ <li><a href="../Sprout/Errors/MissingGeneratorError.html">Sprout::Errors::MissingGeneratorError</a></li>
205
+
206
+ <li><a href="../Sprout/Errors/MissingTemplateError.html">Sprout::Errors::MissingTemplateError</a></li>
207
+
208
+ <li><a href="../Sprout/Errors/ProcessRunnerError.html">Sprout::Errors::ProcessRunnerError</a></li>
209
+
210
+ <li><a href="../Sprout/Errors/RemoteFileLoaderError.html">Sprout::Errors::RemoteFileLoaderError</a></li>
211
+
212
+ <li><a href="../Sprout/Errors/SproutError.html">Sprout::Errors::SproutError</a></li>
213
+
214
+ <li><a href="../Sprout/Errors/UnknownArchiveType.html">Sprout::Errors::UnknownArchiveType</a></li>
215
+
216
+ <li><a href="../Sprout/Errors/UsageError.html">Sprout::Errors::UsageError</a></li>
217
+
218
+ <li><a href="../Sprout/Errors/ValidationError.html">Sprout::Errors::ValidationError</a></li>
219
+
220
+ <li><a href="../Sprout/Errors/VersionRequirementNotMetError.html">Sprout::Errors::VersionRequirementNotMetError</a></li>
221
+
222
+ <li><a href="../Sprout/Executable.html">Sprout::Executable</a></li>
223
+
224
+ <li><a href="../Sprout/Executable/Boolean.html">Sprout::Executable::Boolean</a></li>
225
+
226
+ <li><a href="../Sprout/Executable/ClassMethods.html">Sprout::Executable::ClassMethods</a></li>
227
+
228
+ <li><a href="../Sprout/Executable/CollectionParam.html">Sprout::Executable::CollectionParam</a></li>
229
+
230
+ <li><a href="../Sprout/Executable/FileParam.html">Sprout::Executable::FileParam</a></li>
231
+
232
+ <li><a href="../Sprout/Executable/Files.html">Sprout::Executable::Files</a></li>
233
+
234
+ <li><a href="../Sprout/Executable/InstanceMethods.html">Sprout::Executable::InstanceMethods</a></li>
235
+
236
+ <li><a href="../Sprout/Executable/Number.html">Sprout::Executable::Number</a></li>
237
+
238
+ <li><a href="../Sprout/Executable/Param.html">Sprout::Executable::Param</a></li>
239
+
240
+ <li><a href="../Sprout/Executable/ParameterFactory.html">Sprout::Executable::ParameterFactory</a></li>
241
+
242
+ <li><a href="../Sprout/Executable/Path.html">Sprout::Executable::Path</a></li>
243
+
244
+ <li><a href="../Sprout/Executable/Paths.html">Sprout::Executable::Paths</a></li>
245
+
246
+ <li><a href="../Sprout/Executable/StringParam.html">Sprout::Executable::StringParam</a></li>
247
+
248
+ <li><a href="../Sprout/Executable/Strings.html">Sprout::Executable::Strings</a></li>
249
+
250
+ <li><a href="../Sprout/Executable/Url.html">Sprout::Executable::Url</a></li>
251
+
252
+ <li><a href="../Sprout/Executable/Urls.html">Sprout::Executable::Urls</a></li>
253
+
254
+ <li><a href="../Sprout/FileTarget.html">Sprout::FileTarget</a></li>
255
+
256
+ <li><a href="../Sprout/Generator.html">Sprout::Generator</a></li>
257
+
258
+ <li><a href="../Sprout/Generator/Base.html">Sprout::Generator::Base</a></li>
259
+
260
+ <li><a href="../Sprout/Generator/Command.html">Sprout::Generator::Command</a></li>
261
+
262
+ <li><a href="../Sprout/Generator/DirectoryManifest.html">Sprout::Generator::DirectoryManifest</a></li>
263
+
264
+ <li><a href="../Sprout/Generator/FileManifest.html">Sprout::Generator::FileManifest</a></li>
265
+
266
+ <li><a href="../Sprout/Generator/Manifest.html">Sprout::Generator::Manifest</a></li>
267
+
268
+ <li><a href="../Sprout/Generator/TemplateManifest.html">Sprout::Generator::TemplateManifest</a></li>
269
+
270
+ <li><a href="../Sprout/GeneratorGenerator.html">Sprout::GeneratorGenerator</a></li>
271
+
272
+ <li><a href="../Sprout/Library.html">Sprout::Library</a></li>
273
+
274
+ <li><a href="../Sprout/LibraryGenerator.html">Sprout::LibraryGenerator</a></li>
275
+
276
+ <li><a href="../Sprout/Platform.html">Sprout::Platform</a></li>
277
+
278
+ <li><a href="../Sprout/ProcessRunner.html">Sprout::ProcessRunner</a></li>
279
+
280
+ <li><a href="../Sprout/RDocParser.html">Sprout::RDocParser</a></li>
281
+
282
+ <li><a href="../Sprout/RemoteFileLoader.html">Sprout::RemoteFileLoader</a></li>
283
+
284
+ <li><a href="../Sprout/RemoteFileTarget.html">Sprout::RemoteFileTarget</a></li>
285
+
286
+ <li><a href="../Sprout/RubyFeature.html">Sprout::RubyFeature</a></li>
287
+
288
+ <li><a href="../Sprout/RubyFeature/ClassMethods.html">Sprout::RubyFeature::ClassMethods</a></li>
289
+
290
+ <li><a href="../Sprout/RubyGenerator.html">Sprout::RubyGenerator</a></li>
291
+
292
+ <li><a href="../Sprout/Specification.html">Sprout::Specification</a></li>
293
+
294
+ <li><a href="../Sprout/System.html">Sprout::System</a></li>
295
+
296
+ <li><a href="../Sprout/System/BaseSystem.html">Sprout::System::BaseSystem</a></li>
297
+
298
+ <li><a href="../Sprout/System/JavaSystem.html">Sprout::System::JavaSystem</a></li>
299
+
300
+ <li><a href="../Sprout/System/OSXSystem.html">Sprout::System::OSXSystem</a></li>
301
+
302
+ <li><a href="../Sprout/System/UnixSystem.html">Sprout::System::UnixSystem</a></li>
303
+
304
+ <li><a href="../Sprout/System/VistaSystem.html">Sprout::System::VistaSystem</a></li>
305
+
306
+ <li><a href="../Sprout/System/WinNixSystem.html">Sprout::System::WinNixSystem</a></li>
307
+
308
+ <li><a href="../Sprout/System/WinSystem.html">Sprout::System::WinSystem</a></li>
309
+
310
+ <li><a href="../Sprout/ToolGenerator.html">Sprout::ToolGenerator</a></li>
311
+
312
+ <li><a href="../<.html"><</a></li>
313
+
314
+ <li><a href="../Dir.html">Dir</a></li>
315
+
316
+ <li><a href="../Object.html">Object</a></li>
317
+
318
+ <li><a href="../String.html">String</a></li>
319
+
320
+ </ul>
321
+ <div id="no-class-search-results" style="display: none;">No matching classes.</div>
322
+ </div>
323
+
324
+
325
+ </div>
326
+ </div>
327
+
328
+ <div id="documentation">
329
+ <h1 class="module">Sprout::Executable</h1>
330
+
331
+ <div id="description">
332
+ <p>
333
+ The <a href="Executable.html">Sprout::Executable</a> module is a Domain
334
+ Specific Language for describing Command Line Interface (CLI) applications.
335
+ </p>
336
+ <p>
337
+ This module can be included by any class, and depending on how that class
338
+ is used, one can either parse command line arguments into meaningful,
339
+ structured data, or delegate ruby code and configuration to an existing,
340
+ external command line process.
341
+ </p>
342
+ <p>
343
+ Following is an example of how one could define an executable Ruby
344
+ application using this module:
345
+ </p>
346
+ <pre>
347
+ # /usr/bin/env ruby
348
+
349
+ require 'rubygems'
350
+ require 'sprout'
351
+
352
+ class CustomParameter &lt; Sprout::Executable::Param; end
353
+
354
+ class EchoInputs
355
+ include Sprout::Executable
356
+
357
+ ##
358
+ # A boolean parameter that will be set to true if present.
359
+ #
360
+ # echo-inputs --truthy
361
+ #
362
+ add_param :truthy, Boolean
363
+
364
+ ##
365
+ # A boolean parameter that defaults to true, and must be
366
+ # explicitly set to false in order to turn it off.
367
+ #
368
+ # echo-inputs --falsey=false
369
+ #
370
+ add_param :falsey, Boolean, { :default =&gt; true, :hidden_value =&gt; false, :show_on_false =&gt; true }
371
+
372
+ ##
373
+ # A file that exists at the time it is provided.
374
+ #
375
+ # echo-inputs --file=lib/sprout.rb
376
+ #
377
+ add_param :file, File
378
+
379
+ ##
380
+ # A collection of files, this parameter can be repeated
381
+ # any number of times.
382
+ #
383
+ # echo-inputs --files+=rakefile.rb --files+=README.textil
384
+ #
385
+ add_param :files, Files
386
+
387
+ ##
388
+ # A numeric value.
389
+ #
390
+ # echo-inputs --number=23
391
+ #
392
+ add_param :number, Number
393
+
394
+ ##
395
+ # A relative or fully-qualified path to a directory.
396
+ #
397
+ # echo-inputs --path=lib/
398
+ #
399
+ add_param :path, Path
400
+
401
+ ##
402
+ # Relative or fully-qualified paths to directories.
403
+ #
404
+ # echo-inputs --paths+=lib/ --paths+=test/
405
+ #
406
+ add_param :paths, Paths
407
+
408
+ ##
409
+ # A simple string value.
410
+ #
411
+ # echo-inputs --string='Some String'
412
+ #
413
+ add_param :string, String
414
+
415
+ ##
416
+ # A collection of simple string values.
417
+ #
418
+ # echo-inputs --strings+='First' --strings+='Second'
419
+ #
420
+ add_param :strings, Strings
421
+
422
+ ##
423
+ # A short version of another parameter.
424
+ #
425
+ # echo-inputs -sp+='First' --sp+='Second'
426
+ #
427
+ add_param_alias :sp, :strings
428
+
429
+
430
+ ##
431
+ # A collection of url values.
432
+ #
433
+ # echo-inputs --urls+='http://google.com' --urls+='http://yahoo.com'
434
+ #
435
+ add_param :urls, Urls
436
+
437
+ ##
438
+ # A custom parameter type that is provided by this tool.
439
+ #
440
+ # echo-inputs --custom='Some Value'
441
+ #
442
+ add_param :custom, CustomParameter
443
+
444
+ ##
445
+ # A required value with a hidden name. This kind of value is often
446
+ # presented as the default option.
447
+ #
448
+ # echo-inputs lib/sprout.rb
449
+ #
450
+ add_param :input, File, { :required =&gt; true }
451
+
452
+ def execute
453
+ puts &quot;--truthy=#{truthy}&quot; if truthy
454
+ puts &quot;--falsey=#{falsey}&quot; unless falsey
455
+ puts &quot;--file=#{file}&quot; unless file.nil?
456
+ puts &quot;--files=#{files.inspect}&quot; unless files.empty?
457
+ puts &quot;--number=#{number}&quot; unless number.nil?
458
+ puts &quot;--path=#{path}&quot; unless path.nil?
459
+ puts &quot;--paths=#{paths.inspect}&quot; unless paths.empty?
460
+ puts &quot;--string=#{string}&quot; unless string.nil?
461
+ puts &quot;--strings=#{strings.inspect}&quot; unless strings.empty?
462
+ puts &quot;--sp=#{sp.inspect}&quot; unless sp.empty?
463
+ puts &quot;--urls=#{urls.inspect}&quot; unless urls.empty?
464
+ puts &quot;--custom=#{custom}&quot; unless custom.nil?
465
+ puts &quot; [input]: #{input}&quot;
466
+ end
467
+ end
468
+
469
+ ##
470
+ # When we're the outer application,
471
+ # run like an application:
472
+ if($0 == __FILE__)
473
+ exe = EchoInputs.new
474
+ exe.parse! ARGV
475
+ exe.execute
476
+ end
477
+
478
+ ##
479
+ # Expose this application to Rake like:
480
+ #
481
+ # echo_inputs do |t|
482
+ # t.string = 'Foo'
483
+ # t.falsey = false
484
+ # end
485
+ #
486
+ def echo_inputs args
487
+ exe = EchoInputs.new
488
+ yield exe if block_given?
489
+ # Use 'file' task as if we were a compiler
490
+ # that created a file...
491
+ file args do
492
+ exe.execute
493
+ end
494
+ exe
495
+ end
496
+
497
+ </pre>
498
+
499
+ </div>
500
+
501
+ <!-- Constants -->
502
+
503
+ <div id="constants-list" class="section">
504
+ <h3 class="section-header">Constants</h3>
505
+ <dl>
506
+
507
+ <dt><a name="DEFAULT_FILE_EXPRESSION">DEFAULT_FILE_EXPRESSION</a></dt>
508
+
509
+ <dd class="description"></dd>
510
+
511
+
512
+ <dt><a name="DEFAULT_PREFIX">DEFAULT_PREFIX</a></dt>
513
+
514
+ <dd class="description"></dd>
515
+
516
+
517
+ <dt><a name="DEFAULT_SHORT_PREFIX">DEFAULT_SHORT_PREFIX</a></dt>
518
+
519
+ <dd class="description"></dd>
520
+
521
+
522
+ </dl>
523
+ </div>
524
+
525
+
526
+ <!-- Attributes -->
527
+
528
+
529
+ <!-- Methods -->
530
+
531
+
532
+ </div>
533
+
534
+
535
+ <div id="rdoc-debugging-section-dump" class="debugging-section">
536
+
537
+ <p>Disabled; run with --debug to generate this.</p>
538
+
539
+ </div>
540
+
541
+ <div id="validator-badges">
542
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
543
+ <p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
544
+ Rdoc Generator</a> 1.1.6</small>.</p>
545
+ </div>
546
+
547
+ </body>
548
+ </html>
549
+