sprout 1.0.35.pre → 1.1.2.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 (234) hide show
  1. data/Gemfile +1 -1
  2. data/Gemfile.lock +0 -2
  3. data/README.textile +1 -1
  4. data/VERSION +1 -1
  5. data/lib/sprout/concern.rb +5 -7
  6. data/lib/sprout/daemon.rb +183 -143
  7. data/lib/sprout/executable/base.rb +564 -0
  8. data/lib/sprout/executable.rb +1 -550
  9. data/lib/sprout/generator/base.rb +2 -3
  10. data/lib/sprout/generator.rb +2 -1
  11. data/lib/sprout/generators/ruby/templates/ruby_base.rb +1 -2
  12. data/lib/sprout/library.rb +3 -3
  13. data/lib/sprout/output_buffer.rb +35 -0
  14. data/lib/sprout/process_runner.rb +68 -17
  15. data/lib/sprout/progress_bar.rb +5 -5
  16. data/lib/sprout/remote_file_target.rb +1 -1
  17. data/lib/sprout/system/base_system.rb +3 -3
  18. data/lib/sprout/system/unix_system.rb +1 -1
  19. data/lib/sprout/{test/sprout_test_case.rb → test_helper.rb} +214 -14
  20. data/lib/sprout/version.rb +1 -1
  21. data/lib/sprout.rb +133 -2
  22. data/rakefile.rb +2 -0
  23. data/test/fixtures/examples/echo_inputs.rb +1 -2
  24. data/test/fixtures/executable/fdb.rb +7 -9
  25. data/test/fixtures/executable/flex3sdk_gem/fdb +49 -18
  26. data/test/fixtures/executable/mxmlc.rb +1 -2
  27. data/test/fixtures/executable/subclass/executable_subclass.rb +0 -1
  28. data/test/fixtures/executable/subclass/executable_superclass.rb +1 -2
  29. data/test/fixtures/specification/flex4sdk.rb +35 -24
  30. data/test/unit/archive_unpacker_test.rb +1 -1
  31. data/test/unit/boolean_param_test.rb +1 -1
  32. data/test/unit/daemon_test.rb +35 -3
  33. data/test/unit/executable_option_parser_test.rb +2 -3
  34. data/test/unit/executable_param_test.rb +1 -1
  35. data/test/unit/executable_test.rb +8 -15
  36. data/test/unit/fake_other_executable.rb +1 -2
  37. data/test/unit/file_param_test.rb +1 -1
  38. data/test/unit/file_target_test.rb +1 -1
  39. data/test/unit/files_param_test.rb +1 -1
  40. data/test/unit/generator_generator_test.rb +1 -1
  41. data/test/unit/generator_test.rb +1 -1
  42. data/test/unit/library_generator_test.rb +1 -1
  43. data/test/unit/library_test.rb +1 -1
  44. data/test/unit/osx_system_test.rb +1 -1
  45. data/test/unit/path_param_test.rb +1 -1
  46. data/test/unit/paths_param_test.rb +1 -1
  47. data/test/unit/platform_test.rb +1 -1
  48. data/test/unit/process_runner_test.rb +1 -1
  49. data/test/unit/rdoc_parser_test.rb +1 -1
  50. data/test/unit/remote_file_loader_test.rb +1 -1
  51. data/test/unit/remote_file_target_test.rb +1 -1
  52. data/test/unit/ruby_feature_test.rb +1 -1
  53. data/test/unit/ruby_generator_test.rb +1 -1
  54. data/test/unit/specification_test.rb +8 -1
  55. data/test/unit/sprout_test.rb +2 -2
  56. data/test/unit/string_param_test.rb +1 -1
  57. data/test/unit/string_test.rb +1 -1
  58. data/test/unit/strings_param_test.rb +1 -1
  59. data/test/unit/test_helper.rb +33 -1
  60. data/test/unit/tool_generator_test.rb +1 -1
  61. data/test/unit/unix_system_test.rb +1 -1
  62. data/test/unit/user_test.rb +1 -1
  63. data/test/unit/vista_system_test.rb +1 -1
  64. data/test/unit/win_nix_system_test.rb +1 -1
  65. data/test/unit/win_system_test.rb +1 -1
  66. data/test-stderr.log +1 -0
  67. data/test-stdout.log +237 -0
  68. metadata +15 -190
  69. data/doc/Dir.html +0 -288
  70. data/doc/Rake/Task.html +0 -184
  71. data/doc/Sprout/ArchiveUnpacker.html +0 -1246
  72. data/doc/Sprout/Base/ClassMethods.html +0 -434
  73. data/doc/Sprout/Base.html +0 -126
  74. data/doc/Sprout/Concern.html +0 -353
  75. data/doc/Sprout/Daemon/ClassMethods.html +0 -244
  76. data/doc/Sprout/Daemon/InstanceMethods.html +0 -601
  77. data/doc/Sprout/Daemon.html +0 -166
  78. data/doc/Sprout/Errors/ArchiveUnpackerError.html +0 -125
  79. data/doc/Sprout/Errors/DestinationExistsError.html +0 -133
  80. data/doc/Sprout/Errors/DuplicateMemberError.html +0 -132
  81. data/doc/Sprout/Errors/ExecutableError.html +0 -125
  82. data/doc/Sprout/Errors/ExecutableRegistrationError.html +0 -132
  83. data/doc/Sprout/Errors/ExecutionError.html +0 -121
  84. data/doc/Sprout/Errors/GeneratorError.html +0 -125
  85. data/doc/Sprout/Errors/InvalidArgumentError.html +0 -132
  86. data/doc/Sprout/Errors/LoadError.html +0 -121
  87. data/doc/Sprout/Errors/MissingArgumentError.html +0 -132
  88. data/doc/Sprout/Errors/MissingExecutableError.html +0 -132
  89. data/doc/Sprout/Errors/MissingGeneratorError.html +0 -132
  90. data/doc/Sprout/Errors/MissingTemplateError.html +0 -132
  91. data/doc/Sprout/Errors/ProcessRunnerError.html +0 -121
  92. data/doc/Sprout/Errors/RemoteFileLoaderError.html +0 -110
  93. data/doc/Sprout/Errors/SproutError.html +0 -114
  94. data/doc/Sprout/Errors/UnknownArchiveType.html +0 -122
  95. data/doc/Sprout/Errors/UsageError.html +0 -121
  96. data/doc/Sprout/Errors/ValidationError.html +0 -121
  97. data/doc/Sprout/Errors/VersionRequirementNotMetError.html +0 -121
  98. data/doc/Sprout/Errors.html +0 -101
  99. data/doc/Sprout/Executable/Boolean.html +0 -483
  100. data/doc/Sprout/Executable/ClassMethods.html +0 -417
  101. data/doc/Sprout/Executable/CollectionParam.html +0 -483
  102. data/doc/Sprout/Executable/FileParam.html +0 -484
  103. data/doc/Sprout/Executable/Files.html +0 -292
  104. data/doc/Sprout/Executable/InstanceMethods.html +0 -2006
  105. data/doc/Sprout/Executable/Number.html +0 -141
  106. data/doc/Sprout/Executable/Param.html +0 -2818
  107. data/doc/Sprout/Executable/ParameterFactory.html +0 -232
  108. data/doc/Sprout/Executable/Path.html +0 -223
  109. data/doc/Sprout/Executable/Paths.html +0 -253
  110. data/doc/Sprout/Executable/StringParam.html +0 -213
  111. data/doc/Sprout/Executable/Strings.html +0 -167
  112. data/doc/Sprout/Executable/Url.html +0 -160
  113. data/doc/Sprout/Executable/Urls.html +0 -170
  114. data/doc/Sprout/Executable.html +0 -173
  115. data/doc/Sprout/FileTarget.html +0 -1109
  116. data/doc/Sprout/Generator/Base.html +0 -1626
  117. data/doc/Sprout/Generator/Command.html +0 -690
  118. data/doc/Sprout/Generator/DirectoryManifest.html +0 -476
  119. data/doc/Sprout/Generator/FileManifest.html +0 -572
  120. data/doc/Sprout/Generator/Manifest.html +0 -377
  121. data/doc/Sprout/Generator/TemplateManifest.html +0 -196
  122. data/doc/Sprout/Generator.html +0 -689
  123. data/doc/Sprout/GeneratorGenerator.html +0 -1018
  124. data/doc/Sprout/Library.html +0 -1141
  125. data/doc/Sprout/LibraryGenerator.html +0 -309
  126. data/doc/Sprout/Log.html +0 -496
  127. data/doc/Sprout/MXMLC.html +0 -6373
  128. data/doc/Sprout/Platform.html +0 -714
  129. data/doc/Sprout/ProcessRunner.html +0 -1352
  130. data/doc/Sprout/ProgressBar.html +0 -376
  131. data/doc/Sprout/ProgressBarImpl.html +0 -2119
  132. data/doc/Sprout/ProgressBarManager.html +0 -434
  133. data/doc/Sprout/ProgressBarOutputStream.html +0 -416
  134. data/doc/Sprout/RDocParser.html +0 -211
  135. data/doc/Sprout/RemoteFileLoader.html +0 -172
  136. data/doc/Sprout/RemoteFileTarget.html +0 -679
  137. data/doc/Sprout/ReversedProgressBar.html +0 -194
  138. data/doc/Sprout/RubyFeature/ClassMethods.html +0 -1065
  139. data/doc/Sprout/RubyFeature.html +0 -155
  140. data/doc/Sprout/RubyGenerator.html +0 -764
  141. data/doc/Sprout/Specification.html +0 -767
  142. data/doc/Sprout/System/BaseSystem.html +0 -1455
  143. data/doc/Sprout/System/JavaSystem.html +0 -122
  144. data/doc/Sprout/System/OSXSystem.html +0 -335
  145. data/doc/Sprout/System/ThreadMock.html +0 -193
  146. data/doc/Sprout/System/UnixSystem.html +0 -584
  147. data/doc/Sprout/System/VistaSystem.html +0 -251
  148. data/doc/Sprout/System/WinNixSystem.html +0 -325
  149. data/doc/Sprout/System/WinSystem.html +0 -571
  150. data/doc/Sprout/System.html +0 -191
  151. data/doc/Sprout/ToolGenerator.html +0 -931
  152. data/doc/Sprout/VERSION.html +0 -128
  153. data/doc/Sprout.html +0 -144
  154. data/doc/SproutTestCase.html +0 -1412
  155. data/doc/String.html +0 -286
  156. data/doc/_index.html +0 -1035
  157. data/doc/class_list.html +0 -36
  158. data/doc/css/common.css +0 -1
  159. data/doc/css/full_list.css +0 -53
  160. data/doc/css/style.css +0 -310
  161. data/doc/file.README.html +0 -96
  162. data/doc/file.archive_unpacker.html +0 -288
  163. data/doc/file.base.html +0 -208
  164. data/doc/file.base_system.html +0 -278
  165. data/doc/file.boolean.html +0 -135
  166. data/doc/file.collection_param.html +0 -139
  167. data/doc/file.command.html +0 -126
  168. data/doc/file.concern.html +0 -136
  169. data/doc/file.daemon.html +0 -309
  170. data/doc/file.dir.html +0 -76
  171. data/doc/file.directory_manifest.html +0 -122
  172. data/doc/file.errors.html +0 -147
  173. data/doc/file.executable.html +0 -638
  174. data/doc/file.file_manifest.html +0 -109
  175. data/doc/file.file_param.html +0 -120
  176. data/doc/file.file_target.html +0 -140
  177. data/doc/file.files.html +0 -85
  178. data/doc/file.generator.html +0 -296
  179. data/doc/file.generator_class.html +0 -72
  180. data/doc/file.generator_generator.html +0 -137
  181. data/doc/file.generator_test.html +0 -92
  182. data/doc/file.generator_test_helper.html +0 -67
  183. data/doc/file.java_system.html +0 -62
  184. data/doc/file.library.html +0 -291
  185. data/doc/file.library_generator.html +0 -74
  186. data/doc/file.log.html +0 -100
  187. data/doc/file.manifest.html +0 -67
  188. data/doc/file.mxmlc.html +0 -740
  189. data/doc/file.number.html +0 -67
  190. data/doc/file.osx_system.html +0 -79
  191. data/doc/file.param.html +0 -491
  192. data/doc/file.parameter_factory.html +0 -119
  193. data/doc/file.path.html +0 -81
  194. data/doc/file.paths.html +0 -80
  195. data/doc/file.platform.html +0 -124
  196. data/doc/file.process_runner.html +0 -224
  197. data/doc/file.progress_bar.html +0 -390
  198. data/doc/file.rdoc_parser.html +0 -145
  199. data/doc/file.remote_file_loader.html +0 -117
  200. data/doc/file.remote_file_target.html +0 -176
  201. data/doc/file.ruby_base.html +0 -64
  202. data/doc/file.ruby_feature.html +0 -244
  203. data/doc/file.ruby_generator.html +0 -118
  204. data/doc/file.ruby_input.html +0 -62
  205. data/doc/file.ruby_test_case.html +0 -78
  206. data/doc/file.ruby_test_helper.html +0 -61
  207. data/doc/file.specification.html +0 -248
  208. data/doc/file.sprout.html +0 -64
  209. data/doc/file.sprout_test_case.html +0 -280
  210. data/doc/file.string.html +0 -72
  211. data/doc/file.string_param.html +0 -76
  212. data/doc/file.strings.html +0 -71
  213. data/doc/file.system.html +0 -86
  214. data/doc/file.template_manifest.html +0 -67
  215. data/doc/file.tool.html +0 -92
  216. data/doc/file.tool_generator.html +0 -90
  217. data/doc/file.unix_system.html +0 -128
  218. data/doc/file.url.html +0 -71
  219. data/doc/file.urls.html +0 -70
  220. data/doc/file.version.html +0 -71
  221. data/doc/file.vista_system.html +0 -69
  222. data/doc/file.win_nix_system.html +0 -88
  223. data/doc/file.win_system.html +0 -129
  224. data/doc/file_list.html +0 -230
  225. data/doc/frames.html +0 -13
  226. data/doc/index.html +0 -96
  227. data/doc/js/app.js +0 -202
  228. data/doc/js/full_list.js +0 -149
  229. data/doc/js/jquery.js +0 -154
  230. data/doc/method_list.html +0 -3355
  231. data/doc/top-level-namespace.html +0 -192
  232. data/lib/sprout/base.rb +0 -121
  233. data/lib/sprout/log.rb +0 -46
  234. data/test/unit/sprout_test_helper.rb +0 -33
@@ -1,1626 +0,0 @@
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::Generator::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="../Generator.html" title="Sprout::Generator (module)">Generator</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::Generator::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::Generator::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)">Executable</a></span></dd>
75
-
76
-
77
-
78
-
79
-
80
- <dt class="r1 last">Defined in:</dt>
81
- <dd class="r1 last">lib/sprout/generator/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="../GeneratorGenerator.html" title="Sprout::GeneratorGenerator (class)">Sprout::GeneratorGenerator</a></span>, <span class='object_link'><a href="../LibraryGenerator.html" title="Sprout::LibraryGenerator (class)">LibraryGenerator</a></span>, <span class='object_link'><a href="../RubyGenerator.html" title="Sprout::RubyGenerator (class)">RubyGenerator</a></span>, <span class='object_link'><a href="../ToolGenerator.html" title="Sprout::ToolGenerator (class)">ToolGenerator</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)">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="#destroy-instance_method" title="#destroy (instance method)">- (Boolean) <strong>destroy</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>Insteast of creating, destroy the files.</p>
134
- </div></span>
135
-
136
- </li>
137
-
138
-
139
- <li class="public ">
140
- <span class="summary_signature">
141
-
142
- <a href="#force-instance_method" title="#force (instance method)">- (Boolean) <strong>force</strong> </a>
143
-
144
-
145
-
146
- </span>
147
-
148
-
149
-
150
-
151
-
152
-
153
-
154
-
155
-
156
-
157
-
158
- <span class="summary_desc"><div class='inline'>
159
- <p>Force the creation of files without prompting.</p>
160
- </div></span>
161
-
162
- </li>
163
-
164
-
165
- <li class="public ">
166
- <span class="summary_signature">
167
-
168
- <a href="#input-instance_method" title="#input (instance method)">- (String) <strong>input</strong> </a>
169
-
170
-
171
-
172
- </span>
173
-
174
-
175
-
176
-
177
-
178
-
179
-
180
-
181
-
182
-
183
-
184
- <span class="summary_desc"><div class='inline'>
185
- <p>The primary input for the application or component.</p>
186
- </div></span>
187
-
188
- </li>
189
-
190
-
191
- <li class="public ">
192
- <span class="summary_signature">
193
-
194
- <a href="#logger-instance_method" title="#logger (instance method)">- (Object) <strong>logger</strong> </a>
195
-
196
-
197
-
198
- </span>
199
-
200
-
201
-
202
-
203
-
204
-
205
-
206
-
207
-
208
-
209
-
210
- <span class="summary_desc"><div class='inline'>
211
- <p>Returns the value of attribute logger.</p>
212
- </div></span>
213
-
214
- </li>
215
-
216
-
217
- <li class="public ">
218
- <span class="summary_signature">
219
-
220
- <a href="#name-instance_method" title="#name (instance method)">- (Object) <strong>name</strong> </a>
221
-
222
-
223
-
224
- </span>
225
-
226
-
227
-
228
-
229
-
230
-
231
-
232
-
233
-
234
-
235
-
236
- <span class="summary_desc"><div class='inline'>
237
- <p>The symbol name for which this generator is most appropriate.</p>
238
- </div></span>
239
-
240
- </li>
241
-
242
-
243
- <li class="public ">
244
- <span class="summary_signature">
245
-
246
- <a href="#path-instance_method" title="#path (instance method)">- (Path) <strong>path</strong> </a>
247
-
248
-
249
-
250
- </span>
251
-
252
-
253
-
254
-
255
-
256
-
257
-
258
-
259
-
260
-
261
-
262
- <span class="summary_desc"><div class='inline'>
263
- <p>The directory where files will be created.</p>
264
- </div></span>
265
-
266
- </li>
267
-
268
-
269
- <li class="public ">
270
- <span class="summary_signature">
271
-
272
- <a href="#pkg_name-instance_method" title="#pkg_name (instance method)">- (Object) <strong>pkg_name</strong> </a>
273
-
274
-
275
-
276
- </span>
277
-
278
-
279
-
280
-
281
-
282
-
283
-
284
-
285
-
286
-
287
-
288
- <span class="summary_desc"><div class='inline'>
289
- <p>Returns the value of attribute pkg_name.</p>
290
- </div></span>
291
-
292
- </li>
293
-
294
-
295
- <li class="public ">
296
- <span class="summary_signature">
297
-
298
- <a href="#pkg_version-instance_method" title="#pkg_version (instance method)">- (Object) <strong>pkg_version</strong> </a>
299
-
300
-
301
-
302
- </span>
303
-
304
-
305
-
306
-
307
-
308
-
309
-
310
-
311
-
312
-
313
-
314
- <span class="summary_desc"><div class='inline'>
315
- <p>Returns the value of attribute pkg_version.</p>
316
- </div></span>
317
-
318
- </li>
319
-
320
-
321
- <li class="public ">
322
- <span class="summary_signature">
323
-
324
- <a href="#quiet-instance_method" title="#quiet (instance method)">- (Boolean) <strong>quiet</strong> </a>
325
-
326
-
327
-
328
- </span>
329
-
330
-
331
-
332
-
333
-
334
-
335
-
336
-
337
-
338
-
339
-
340
- <span class="summary_desc"><div class='inline'>
341
- <p>Run the generator in Quiet mode - do not write status to standard output.</p>
342
- </div></span>
343
-
344
- </li>
345
-
346
-
347
- <li class="public ">
348
- <span class="summary_signature">
349
-
350
- <a href="#templates-instance_method" title="#templates (instance method)">- (Array&lt;String&gt; [Paths]) <strong>templates</strong> </a>
351
-
352
-
353
-
354
- </span>
355
-
356
-
357
-
358
-
359
-
360
-
361
-
362
-
363
-
364
-
365
-
366
- <span class="summary_desc"><div class='inline'>
367
- <p>A collection of paths to look in for named templates.</p>
368
- </div></span>
369
-
370
- </li>
371
-
372
-
373
- </ul>
374
-
375
-
376
-
377
- <h2>
378
- Class Method Summary
379
- <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
380
- </h2>
381
-
382
- <ul class="summary">
383
-
384
- <li class="public ">
385
- <span class="summary_signature">
386
-
387
- <a href="#inherited-class_method" title="inherited (class method)">+ (Object) <strong>inherited</strong>(base) </a>
388
-
389
-
390
-
391
- </span>
392
-
393
-
394
-
395
-
396
-
397
-
398
-
399
-
400
- <span class="summary_desc"><div class='inline'></div></span>
401
-
402
- </li>
403
-
404
-
405
- </ul>
406
-
407
- <h2>
408
- Instance Method Summary
409
- <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
410
- </h2>
411
-
412
- <ul class="summary">
413
-
414
- <li class="protected ">
415
- <span class="summary_signature">
416
-
417
- <a href="#default_search_paths-instance_method" title="#default_search_paths (instance method)">- (Object) <strong>default_search_paths</strong> </a>
418
-
419
-
420
-
421
- </span>
422
-
423
-
424
- <span class="note title protected">protected</span>
425
-
426
-
427
-
428
-
429
-
430
- <span class="summary_desc"><div class='inline'></div></span>
431
-
432
- </li>
433
-
434
-
435
- <li class="protected ">
436
- <span class="summary_signature">
437
-
438
- <a href="#directory-instance_method" title="#directory (instance method)">- (Object) <strong>directory</strong>(name, &amp;block) </a>
439
-
440
-
441
-
442
- </span>
443
-
444
-
445
- <span class="note title protected">protected</span>
446
-
447
-
448
-
449
-
450
-
451
- <span class="summary_desc"><div class='inline'></div></span>
452
-
453
- </li>
454
-
455
-
456
- <li class="public ">
457
- <span class="summary_signature">
458
-
459
- <a href="#execute-instance_method" title="#execute (instance method)">- (Object) <strong>execute</strong> </a>
460
-
461
-
462
-
463
- </span>
464
-
465
-
466
-
467
-
468
-
469
-
470
-
471
-
472
- <span class="summary_desc"><div class='inline'>
473
- <p>Record the actions and trigger them.</p>
474
- </div></span>
475
-
476
- </li>
477
-
478
-
479
- <li class="protected ">
480
- <span class="summary_signature">
481
-
482
- <a href="#file-instance_method" title="#file (instance method)">- (Object) <strong>file</strong>(name, template = nil) </a>
483
-
484
-
485
-
486
- </span>
487
-
488
-
489
- <span class="note title protected">protected</span>
490
-
491
-
492
-
493
-
494
-
495
- <span class="summary_desc"><div class='inline'></div></span>
496
-
497
- </li>
498
-
499
-
500
- <li class="protected ">
501
- <span class="summary_signature">
502
-
503
- <a href="#generator-instance_method" title="#generator (instance method)">- (Object) <strong>generator</strong>(name, options = {}) </a>
504
-
505
-
506
-
507
- </span>
508
-
509
-
510
- <span class="note title protected">protected</span>
511
-
512
-
513
-
514
-
515
-
516
- <span class="summary_desc"><div class='inline'></div></span>
517
-
518
- </li>
519
-
520
-
521
- <li class="protected ">
522
- <span class="summary_signature">
523
-
524
- <a href="#prepare_command-instance_method" title="#prepare_command (instance method)">- (Object) <strong>prepare_command</strong> </a>
525
-
526
-
527
-
528
- </span>
529
-
530
-
531
- <span class="note title protected">protected</span>
532
-
533
-
534
-
535
-
536
-
537
- <span class="summary_desc"><div class='inline'></div></span>
538
-
539
- </li>
540
-
541
-
542
- <li class="public ">
543
- <span class="summary_signature">
544
-
545
- <a href="#resolve_template-instance_method" title="#resolve_template (instance method)">- (Object) <strong>resolve_template</strong>(content) </a>
546
-
547
-
548
-
549
- </span>
550
-
551
-
552
-
553
-
554
-
555
-
556
-
557
-
558
- <span class="summary_desc"><div class='inline'>
559
- <p>TODO: Add support for arbitrary templating languages.</p>
560
- </div></span>
561
-
562
- </li>
563
-
564
-
565
- <li class="public ">
566
- <span class="summary_signature">
567
-
568
- <a href="#say-instance_method" title="#say (instance method)">- (Object) <strong>say</strong>(message) </a>
569
-
570
-
571
-
572
- </span>
573
-
574
-
575
-
576
-
577
-
578
-
579
-
580
-
581
- <span class="summary_desc"><div class='inline'></div></span>
582
-
583
- </li>
584
-
585
-
586
- <li class="protected ">
587
- <span class="summary_signature">
588
-
589
- <a href="#template-instance_method" title="#template (instance method)">- (Object) <strong>template</strong>(name, template = nil) </a>
590
-
591
-
592
-
593
- </span>
594
-
595
-
596
- <span class="note title protected">protected</span>
597
-
598
-
599
-
600
-
601
-
602
- <span class="summary_desc"><div class='inline'></div></span>
603
-
604
- </li>
605
-
606
-
607
- <li class="public ">
608
- <span class="summary_signature">
609
-
610
- <a href="#template_paths-instance_method" title="#template_paths (instance method)">- (Object) <strong>template_paths</strong> </a>
611
-
612
-
613
-
614
- </span>
615
-
616
-
617
-
618
-
619
-
620
-
621
-
622
-
623
- <span class="summary_desc"><div class='inline'>
624
- <p>Returns a collection of templates that were provided on the command line,
625
- followed by templates that are created by a concrete generator, followed
626
- by the Sprout::Generator.search_paths + 'templates' folders.</p>
627
- </div></span>
628
-
629
- </li>
630
-
631
-
632
- <li class="public ">
633
- <span class="summary_signature">
634
-
635
- <a href="#unexecute-instance_method" title="#unexecute (instance method)">- (Object) <strong>unexecute</strong> </a>
636
-
637
-
638
-
639
- </span>
640
-
641
-
642
-
643
-
644
-
645
-
646
-
647
-
648
- <span class="summary_desc"><div class='inline'>
649
- <p>Rollback the generator.</p>
650
- </div></span>
651
-
652
- </li>
653
-
654
-
655
- </ul>
656
-
657
-
658
-
659
-
660
-
661
-
662
-
663
-
664
-
665
-
666
-
667
-
668
-
669
-
670
-
671
- <h3 class="inherited">Methods included from <span class='object_link'><a href="../Concern.html" title="Sprout::Concern (module)">Concern</a></span></h3>
672
- <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>
673
-
674
-
675
-
676
-
677
-
678
-
679
- <div id="instance_attr_details" class="attr_details">
680
- <h2>Instance Attribute Details</h2>
681
-
682
-
683
- <span id="destroy=-instance_method"></span>
684
- <span id="destroy-instance_method"></span>
685
- <div class="method_details first">
686
- <p class="signature first" id="destroy-instance_method">
687
-
688
- - (<tt><span class='object_link'><a href="../Executable/Boolean.html" title="Sprout::Executable::Boolean (class)">Boolean</a></span></tt>) <strong>destroy</strong>
689
-
690
-
691
-
692
- </p><div class="docstring">
693
- <div class="discussion">
694
-
695
- <p>Insteast of creating, destroy the files.</p>
696
-
697
-
698
- </div>
699
- </div>
700
- <div class="tags">
701
- <h3>Returns:</h3>
702
- <ul class="return">
703
-
704
- <li>
705
-
706
- <span class='type'>(<tt><span class='object_link'><a href="../Executable/Boolean.html" title="Sprout::Executable::Boolean (class)">Boolean</a></span></tt>)</span>
707
-
708
-
709
-
710
-
711
- &mdash;
712
- <div class='inline'>
713
- <p>An instance of Boolean</p>
714
- </div>
715
-
716
- </li>
717
-
718
- </ul>
719
-
720
- </div><table class="source_code">
721
- <tr>
722
- <td>
723
- <pre class="lines">
724
-
725
-
726
- </pre>
727
- </td>
728
- <td>
729
- <pre class="code"><span class="info file"># File ''</span>
730
-
731
- <span class='id add_param'>add_param</span> <span class='symbol'>:destroy</span><span class='comma'>,</span> <span class='const'>Boolean</span></pre>
732
- </td>
733
- </tr>
734
- </table>
735
- </div>
736
-
737
-
738
- <span id="force=-instance_method"></span>
739
- <span id="force-instance_method"></span>
740
- <div class="method_details ">
741
- <p class="signature " id="force-instance_method">
742
-
743
- - (<tt><span class='object_link'><a href="../Executable/Boolean.html" title="Sprout::Executable::Boolean (class)">Boolean</a></span></tt>) <strong>force</strong>
744
-
745
-
746
-
747
- </p><div class="docstring">
748
- <div class="discussion">
749
-
750
- <p>Force the creation of files without prompting.</p>
751
-
752
-
753
- </div>
754
- </div>
755
- <div class="tags">
756
- <h3>Returns:</h3>
757
- <ul class="return">
758
-
759
- <li>
760
-
761
- <span class='type'>(<tt><span class='object_link'><a href="../Executable/Boolean.html" title="Sprout::Executable::Boolean (class)">Boolean</a></span></tt>)</span>
762
-
763
-
764
-
765
-
766
- &mdash;
767
- <div class='inline'>
768
- <p>An instance of Boolean</p>
769
- </div>
770
-
771
- </li>
772
-
773
- </ul>
774
-
775
- </div><table class="source_code">
776
- <tr>
777
- <td>
778
- <pre class="lines">
779
-
780
-
781
- </pre>
782
- </td>
783
- <td>
784
- <pre class="code"><span class="info file"># File ''</span>
785
-
786
- <span class='id add_param'>add_param</span> <span class='symbol'>:force</span><span class='comma'>,</span> <span class='const'>Boolean</span></pre>
787
- </td>
788
- </tr>
789
- </table>
790
- </div>
791
-
792
-
793
- <span id="input=-instance_method"></span>
794
- <span id="input-instance_method"></span>
795
- <div class="method_details ">
796
- <p class="signature " id="input-instance_method">
797
-
798
- - (<tt><span class='object_link'><a href="../../String.html" title="String (class)">String</a></span></tt>) <strong>input</strong>
799
-
800
-
801
-
802
- </p><div class="docstring">
803
- <div class="discussion">
804
-
805
- <p>The primary input for the application or component.</p>
806
-
807
-
808
- </div>
809
- </div>
810
- <div class="tags">
811
- <h3>Returns:</h3>
812
- <ul class="return">
813
-
814
- <li>
815
-
816
- <span class='type'>(<tt><span class='object_link'><a href="../../String.html" title="String (class)">String</a></span></tt>)</span>
817
-
818
-
819
-
820
-
821
- &mdash;
822
- <div class='inline'>
823
- <p>An instance of String</p>
824
- </div>
825
-
826
- </li>
827
-
828
- </ul>
829
-
830
- </div><table class="source_code">
831
- <tr>
832
- <td>
833
- <pre class="lines">
834
-
835
-
836
- </pre>
837
- </td>
838
- <td>
839
- <pre class="code"><span class="info file"># File ''</span>
840
-
841
- <span class='id add_param'>add_param</span> <span class='symbol'>:input</span><span class='comma'>,</span> <span class='const'>String</span><span class='comma'>,</span> <span class='lbrace'>{</span> <span class='symbol'>:hidden_name</span> <span class='op'>=&gt;</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='symbol'>:required</span> <span class='op'>=&gt;</span> <span class='kw'>true</span> <span class='rbrace'>}</span></pre>
842
- </td>
843
- </tr>
844
- </table>
845
- </div>
846
-
847
-
848
- <span id="logger=-instance_method"></span>
849
- <span id="logger-instance_method"></span>
850
- <div class="method_details ">
851
- <p class="signature " id="logger-instance_method">
852
-
853
- - (<tt>Object</tt>) <strong>logger</strong>
854
-
855
-
856
-
857
- </p><div class="docstring">
858
- <div class="discussion">
859
-
860
- <p>Returns the value of attribute logger</p>
861
-
862
-
863
- </div>
864
- </div>
865
- <div class="tags">
866
-
867
- </div><table class="source_code">
868
- <tr>
869
- <td>
870
- <pre class="lines">
871
-
872
-
873
- 69
874
- 70
875
- 71</pre>
876
- </td>
877
- <td>
878
- <pre class="code"><span class="info file"># File 'lib/sprout/generator/base.rb', line 69</span>
879
-
880
- <span class='kw'>def</span> <span class='id logger'>logger</span>
881
- <span class='ivar'>@logger</span>
882
- <span class='kw'>end</span></pre>
883
- </td>
884
- </tr>
885
- </table>
886
- </div>
887
-
888
-
889
- <span id="name=-instance_method"></span>
890
- <span id="name-instance_method"></span>
891
- <div class="method_details ">
892
- <p class="signature " id="name-instance_method">
893
-
894
- - (<tt>Object</tt>) <strong>name</strong>
895
-
896
-
897
-
898
- </p><div class="docstring">
899
- <div class="discussion">
900
-
901
- <p>The symbol name for which this generator is most appropriate.</p>
902
-
903
- <p>This value defaults to :application so, if you're working on an application
904
- generator, you can leave it as the default.</p>
905
-
906
- <p>For all other generator types, you'll want to select the most general
907
- project type that this generator may be useful in.</p>
908
-
909
- <p>Following are some example values:</p>
910
-
911
- <pre class="code">:as3, :flex3, :flex4, :air2</pre>
912
-
913
- <p>or core libraries:</p>
914
-
915
- <pre class="code">:asunit4, :flexunit4</pre>
916
-
917
- <p>or even other libraries:</p>
918
-
919
- <pre class="code">:puremvc, :robotlegs, :swizz</pre>
920
-
921
-
922
- </div>
923
- </div>
924
- <div class="tags">
925
-
926
- </div><table class="source_code">
927
- <tr>
928
- <td>
929
- <pre class="lines">
930
-
931
-
932
- 68
933
- 69
934
- 70</pre>
935
- </td>
936
- <td>
937
- <pre class="code"><span class="info file"># File 'lib/sprout/generator/base.rb', line 68</span>
938
-
939
- <span class='kw'>def</span> <span class='id name'>name</span>
940
- <span class='ivar'>@name</span>
941
- <span class='kw'>end</span></pre>
942
- </td>
943
- </tr>
944
- </table>
945
- </div>
946
-
947
-
948
- <span id="path=-instance_method"></span>
949
- <span id="path-instance_method"></span>
950
- <div class="method_details ">
951
- <p class="signature " id="path-instance_method">
952
-
953
- - (<tt><span class='object_link'><a href="../Executable/Path.html" title="Sprout::Executable::Path (class)">Path</a></span></tt>) <strong>path</strong>
954
-
955
-
956
-
957
- </p><div class="docstring">
958
- <div class="discussion">
959
-
960
- <p>The directory where files will be created.</p>
961
-
962
-
963
- </div>
964
- </div>
965
- <div class="tags">
966
- <h3>Returns:</h3>
967
- <ul class="return">
968
-
969
- <li>
970
-
971
- <span class='type'>(<tt><span class='object_link'><a href="../Executable/Path.html" title="Sprout::Executable::Path (class)">Path</a></span></tt>)</span>
972
-
973
-
974
-
975
-
976
- &mdash;
977
- <div class='inline'>
978
- <p>An instance of Path</p>
979
- </div>
980
-
981
- </li>
982
-
983
- </ul>
984
-
985
- </div><table class="source_code">
986
- <tr>
987
- <td>
988
- <pre class="lines">
989
-
990
-
991
- </pre>
992
- </td>
993
- <td>
994
- <pre class="code"><span class="info file"># File ''</span>
995
-
996
- <span class='id add_param'>add_param</span> <span class='symbol'>:path</span><span class='comma'>,</span> <span class='const'>Path</span><span class='comma'>,</span> <span class='lbrace'>{</span> <span class='symbol'>:default</span> <span class='op'>=&gt;</span> <span class='const'>Dir</span><span class='period'>.</span><span class='id pwd'>pwd</span> <span class='rbrace'>}</span></pre>
997
- </td>
998
- </tr>
999
- </table>
1000
- </div>
1001
-
1002
-
1003
- <span id="pkg_name=-instance_method"></span>
1004
- <span id="pkg_name-instance_method"></span>
1005
- <div class="method_details ">
1006
- <p class="signature " id="pkg_name-instance_method">
1007
-
1008
- - (<tt>Object</tt>) <strong>pkg_name</strong>
1009
-
1010
-
1011
-
1012
- </p><div class="docstring">
1013
- <div class="discussion">
1014
-
1015
- <p>Returns the value of attribute pkg_name</p>
1016
-
1017
-
1018
- </div>
1019
- </div>
1020
- <div class="tags">
1021
-
1022
- </div><table class="source_code">
1023
- <tr>
1024
- <td>
1025
- <pre class="lines">
1026
-
1027
-
1028
- 70
1029
- 71
1030
- 72</pre>
1031
- </td>
1032
- <td>
1033
- <pre class="code"><span class="info file"># File 'lib/sprout/generator/base.rb', line 70</span>
1034
-
1035
- <span class='kw'>def</span> <span class='id pkg_name'>pkg_name</span>
1036
- <span class='ivar'>@pkg_name</span>
1037
- <span class='kw'>end</span></pre>
1038
- </td>
1039
- </tr>
1040
- </table>
1041
- </div>
1042
-
1043
-
1044
- <span id="pkg_version=-instance_method"></span>
1045
- <span id="pkg_version-instance_method"></span>
1046
- <div class="method_details ">
1047
- <p class="signature " id="pkg_version-instance_method">
1048
-
1049
- - (<tt>Object</tt>) <strong>pkg_version</strong>
1050
-
1051
-
1052
-
1053
- </p><div class="docstring">
1054
- <div class="discussion">
1055
-
1056
- <p>Returns the value of attribute pkg_version</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
- 71
1070
- 72
1071
- 73</pre>
1072
- </td>
1073
- <td>
1074
- <pre class="code"><span class="info file"># File 'lib/sprout/generator/base.rb', line 71</span>
1075
-
1076
- <span class='kw'>def</span> <span class='id pkg_version'>pkg_version</span>
1077
- <span class='ivar'>@pkg_version</span>
1078
- <span class='kw'>end</span></pre>
1079
- </td>
1080
- </tr>
1081
- </table>
1082
- </div>
1083
-
1084
-
1085
- <span id="quiet=-instance_method"></span>
1086
- <span id="quiet-instance_method"></span>
1087
- <div class="method_details ">
1088
- <p class="signature " id="quiet-instance_method">
1089
-
1090
- - (<tt><span class='object_link'><a href="../Executable/Boolean.html" title="Sprout::Executable::Boolean (class)">Boolean</a></span></tt>) <strong>quiet</strong>
1091
-
1092
-
1093
-
1094
- </p><div class="docstring">
1095
- <div class="discussion">
1096
-
1097
- <p>Run the generator in Quiet mode - do not write status to standard output.</p>
1098
-
1099
-
1100
- </div>
1101
- </div>
1102
- <div class="tags">
1103
- <h3>Returns:</h3>
1104
- <ul class="return">
1105
-
1106
- <li>
1107
-
1108
- <span class='type'>(<tt><span class='object_link'><a href="../Executable/Boolean.html" title="Sprout::Executable::Boolean (class)">Boolean</a></span></tt>)</span>
1109
-
1110
-
1111
-
1112
-
1113
- &mdash;
1114
- <div class='inline'>
1115
- <p>An instance of Boolean</p>
1116
- </div>
1117
-
1118
- </li>
1119
-
1120
- </ul>
1121
-
1122
- </div><table class="source_code">
1123
- <tr>
1124
- <td>
1125
- <pre class="lines">
1126
-
1127
-
1128
- </pre>
1129
- </td>
1130
- <td>
1131
- <pre class="code"><span class="info file"># File ''</span>
1132
-
1133
- <span class='id add_param'>add_param</span> <span class='symbol'>:quiet</span><span class='comma'>,</span> <span class='const'>Boolean</span></pre>
1134
- </td>
1135
- </tr>
1136
- </table>
1137
- </div>
1138
-
1139
-
1140
- <span id="templates=-instance_method"></span>
1141
- <span id="templates-instance_method"></span>
1142
- <div class="method_details ">
1143
- <p class="signature " id="templates-instance_method">
1144
-
1145
- - (<tt>Array&lt;<span class='object_link'><a href="../../String.html" title="String (class)">String</a></span>&gt; [<span class='object_link'><a href="../Executable/Paths.html" title="Sprout::Executable::Paths (class)">Paths</a></span>]</tt>) <strong>templates</strong>
1146
-
1147
-
1148
-
1149
- </p><div class="docstring">
1150
- <div class="discussion">
1151
-
1152
- <p>A collection of paths to look in for named templates.</p>
1153
-
1154
-
1155
- </div>
1156
- </div>
1157
- <div class="tags">
1158
- <h3>Returns:</h3>
1159
- <ul class="return">
1160
-
1161
- <li>
1162
-
1163
- <span class='type'>(<tt>Array&lt;<span class='object_link'><a href="../../String.html" title="String (class)">String</a></span>&gt; [<span class='object_link'><a href="../Executable/Paths.html" title="Sprout::Executable::Paths (class)">Paths</a></span>]</tt>)</span>
1164
-
1165
-
1166
-
1167
-
1168
- &mdash;
1169
- <div class='inline'>
1170
- <p>An instance of Array&lt;String&gt; [Paths]</p>
1171
- </div>
1172
-
1173
- </li>
1174
-
1175
- </ul>
1176
-
1177
- </div><table class="source_code">
1178
- <tr>
1179
- <td>
1180
- <pre class="lines">
1181
-
1182
-
1183
- </pre>
1184
- </td>
1185
- <td>
1186
- <pre class="code"><span class="info file"># File ''</span>
1187
-
1188
- <span class='id add_param'>add_param</span> <span class='symbol'>:templates</span><span class='comma'>,</span> <span class='const'>Paths</span></pre>
1189
- </td>
1190
- </tr>
1191
- </table>
1192
- </div>
1193
-
1194
- </div>
1195
-
1196
-
1197
- <div id="class_method_details" class="method_details_list">
1198
- <h2>Class Method Details</h2>
1199
-
1200
-
1201
- <div class="method_details first">
1202
- <p class="signature first" id="inherited-class_method">
1203
-
1204
- + (<tt>Object</tt>) <strong>inherited</strong>(base)
1205
-
1206
-
1207
-
1208
- </p><table class="source_code">
1209
- <tr>
1210
- <td>
1211
- <pre class="lines">
1212
-
1213
-
1214
- 7
1215
- 8
1216
- 9
1217
- 10
1218
- 11
1219
- 12
1220
- 13
1221
- 14
1222
- 15</pre>
1223
- </td>
1224
- <td>
1225
- <pre class="code"><span class="info file"># File 'lib/sprout/generator/base.rb', line 7</span>
1226
-
1227
- <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id inherited'>inherited</span> <span class='id base'>base</span>
1228
- <span class='comment'># NOTE: We can NOT instantiate the class here,
1229
- </span> <span class='comment'># because only it's first line has been interpreted, if we
1230
- </span> <span class='comment'># instantiate here, none of the code declared in the class body will
1231
- </span> <span class='comment'># be associated with this instance.
1232
- </span> <span class='comment'>#
1233
- </span> <span class='comment'># Go ahead and register the class and update instances afterwards.
1234
- </span> <span class='const'>Sprout</span><span class='op'>::</span><span class='const'>Generator</span><span class='period'>.</span><span class='id register'>register</span> <span class='id base'>base</span><span class='comma'>,</span> <span class='id template_from_caller'>template_from_caller</span><span class='lparen'>(</span><span class='id caller'>caller</span><span class='period'>.</span><span class='id first'>first</span><span class='rparen'>)</span>
1235
- <span class='kw'>end</span></pre>
1236
- </td>
1237
- </tr>
1238
- </table>
1239
- </div>
1240
-
1241
- </div>
1242
-
1243
- <div id="instance_method_details" class="method_details_list">
1244
- <h2>Instance Method Details</h2>
1245
-
1246
-
1247
- <div class="method_details first">
1248
- <p class="signature first" id="default_search_paths-instance_method">
1249
-
1250
- - (<tt>Object</tt>) <strong>default_search_paths</strong> <span class="extras">(protected)</span>
1251
-
1252
-
1253
-
1254
- </p><table class="source_code">
1255
- <tr>
1256
- <td>
1257
- <pre class="lines">
1258
-
1259
-
1260
- 115
1261
- 116
1262
- 117</pre>
1263
- </td>
1264
- <td>
1265
- <pre class="code"><span class="info file"># File 'lib/sprout/generator/base.rb', line 115</span>
1266
-
1267
- <span class='kw'>def</span> <span class='id default_search_paths'>default_search_paths</span>
1268
- <span class='const'>Sprout</span><span class='op'>::</span><span class='const'>Generator</span><span class='period'>.</span><span class='id search_paths'>search_paths</span><span class='period'>.</span><span class='id collect'>collect</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id path'>path</span><span class='op'>|</span> <span class='const'>File</span><span class='period'>.</span><span class='id join'>join</span><span class='lparen'>(</span><span class='id path'>path</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>templates</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span> <span class='rbrace'>}</span>
1269
- <span class='kw'>end</span></pre>
1270
- </td>
1271
- </tr>
1272
- </table>
1273
- </div>
1274
-
1275
- <div class="method_details ">
1276
- <p class="signature " id="directory-instance_method">
1277
-
1278
- - (<tt>Object</tt>) <strong>directory</strong>(name, &amp;block) <span class="extras">(protected)</span>
1279
-
1280
-
1281
-
1282
- </p><table class="source_code">
1283
- <tr>
1284
- <td>
1285
- <pre class="lines">
1286
-
1287
-
1288
- 127
1289
- 128
1290
- 129</pre>
1291
- </td>
1292
- <td>
1293
- <pre class="code"><span class="info file"># File 'lib/sprout/generator/base.rb', line 127</span>
1294
-
1295
- <span class='kw'>def</span> <span class='id directory'>directory</span> <span class='id name'>name</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id block'>block</span>
1296
- <span class='ivar'>@command</span><span class='period'>.</span><span class='id directory'>directory</span> <span class='id name'>name</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id block'>block</span>
1297
- <span class='kw'>end</span></pre>
1298
- </td>
1299
- </tr>
1300
- </table>
1301
- </div>
1302
-
1303
- <div class="method_details ">
1304
- <p class="signature " id="execute-instance_method">
1305
-
1306
- - (<tt>Object</tt>) <strong>execute</strong>
1307
-
1308
-
1309
-
1310
- </p><div class="docstring">
1311
- <div class="discussion">
1312
-
1313
- <p>Record the actions and trigger them</p>
1314
-
1315
-
1316
- </div>
1317
- </div>
1318
- <div class="tags">
1319
-
1320
- </div><table class="source_code">
1321
- <tr>
1322
- <td>
1323
- <pre class="lines">
1324
-
1325
-
1326
- 75
1327
- 76
1328
- 77
1329
- 78</pre>
1330
- </td>
1331
- <td>
1332
- <pre class="code"><span class="info file"># File 'lib/sprout/generator/base.rb', line 75</span>
1333
-
1334
- <span class='kw'>def</span> <span class='id execute'>execute</span>
1335
- <span class='kw'>return</span> <span class='id prepare_command'>prepare_command</span><span class='period'>.</span><span class='id unexecute'>unexecute</span> <span class='kw'>if</span> <span class='id destroy'>destroy</span>
1336
- <span class='id prepare_command'>prepare_command</span><span class='period'>.</span><span class='id execute'>execute</span>
1337
- <span class='kw'>end</span></pre>
1338
- </td>
1339
- </tr>
1340
- </table>
1341
- </div>
1342
-
1343
- <div class="method_details ">
1344
- <p class="signature " id="file-instance_method">
1345
-
1346
- - (<tt>Object</tt>) <strong>file</strong>(name, template = nil) <span class="extras">(protected)</span>
1347
-
1348
-
1349
-
1350
- </p><table class="source_code">
1351
- <tr>
1352
- <td>
1353
- <pre class="lines">
1354
-
1355
-
1356
- 131
1357
- 132
1358
- 133</pre>
1359
- </td>
1360
- <td>
1361
- <pre class="code"><span class="info file"># File 'lib/sprout/generator/base.rb', line 131</span>
1362
-
1363
- <span class='kw'>def</span> <span class='id file'>file</span> <span class='id name'>name</span><span class='comma'>,</span> <span class='id template'>template</span><span class='op'>=</span><span class='kw'>nil</span>
1364
- <span class='ivar'>@command</span><span class='period'>.</span><span class='id file'>file</span> <span class='id name'>name</span><span class='comma'>,</span> <span class='id template'>template</span>
1365
- <span class='kw'>end</span></pre>
1366
- </td>
1367
- </tr>
1368
- </table>
1369
- </div>
1370
-
1371
- <div class="method_details ">
1372
- <p class="signature " id="generator-instance_method">
1373
-
1374
- - (<tt>Object</tt>) <strong>generator</strong>(name, options = {}) <span class="extras">(protected)</span>
1375
-
1376
-
1377
-
1378
- </p><table class="source_code">
1379
- <tr>
1380
- <td>
1381
- <pre class="lines">
1382
-
1383
-
1384
- 139
1385
- 140
1386
- 141</pre>
1387
- </td>
1388
- <td>
1389
- <pre class="code"><span class="info file"># File 'lib/sprout/generator/base.rb', line 139</span>
1390
-
1391
- <span class='kw'>def</span> <span class='id generator'>generator</span> <span class='id name'>name</span><span class='comma'>,</span> <span class='id options'>options</span><span class='op'>=</span><span class='lbrace'>{</span><span class='rbrace'>}</span>
1392
- <span class='ivar'>@command</span><span class='period'>.</span><span class='id generator'>generator</span> <span class='id name'>name</span><span class='comma'>,</span> <span class='id to_hash'>to_hash</span><span class='period'>.</span><span class='id merge'>merge</span><span class='lparen'>(</span><span class='id options'>options</span><span class='rparen'>)</span>
1393
- <span class='kw'>end</span></pre>
1394
- </td>
1395
- </tr>
1396
- </table>
1397
- </div>
1398
-
1399
- <div class="method_details ">
1400
- <p class="signature " id="prepare_command-instance_method">
1401
-
1402
- - (<tt>Object</tt>) <strong>prepare_command</strong> <span class="extras">(protected)</span>
1403
-
1404
-
1405
-
1406
- </p><table class="source_code">
1407
- <tr>
1408
- <td>
1409
- <pre class="lines">
1410
-
1411
-
1412
- 119
1413
- 120
1414
- 121
1415
- 122
1416
- 123
1417
- 124
1418
- 125</pre>
1419
- </td>
1420
- <td>
1421
- <pre class="code"><span class="info file"># File 'lib/sprout/generator/base.rb', line 119</span>
1422
-
1423
- <span class='kw'>def</span> <span class='id prepare_command'>prepare_command</span>
1424
- <span class='ivar'>@logger</span> <span class='op'>||=</span> <span class='gvar'>$stdout</span>
1425
- <span class='ivar'>@command</span> <span class='op'>=</span> <span class='const'>Command</span><span class='period'>.</span><span class='id new'>new</span> <span class='kw'>self</span>
1426
- <span class='ivar'>@command</span><span class='period'>.</span><span class='id logger'>logger</span> <span class='op'>=</span> <span class='id logger'>logger</span>
1427
- <span class='id manifest'>manifest</span>
1428
- <span class='ivar'>@command</span>
1429
- <span class='kw'>end</span></pre>
1430
- </td>
1431
- </tr>
1432
- </table>
1433
- </div>
1434
-
1435
- <div class="method_details ">
1436
- <p class="signature " id="resolve_template-instance_method">
1437
-
1438
- - (<tt>Object</tt>) <strong>resolve_template</strong>(content)
1439
-
1440
-
1441
-
1442
- </p><div class="docstring">
1443
- <div class="discussion">
1444
-
1445
- <p>TODO: Add support for arbitrary templating languages. For now, just support
1446
- ERB...</p>
1447
-
1448
- <p>TODO: This is also a possible spot where those of you that don't want to
1449
- snuggle might put pretty-print code or some such modifiers...</p>
1450
-
1451
-
1452
- </div>
1453
- </div>
1454
- <div class="tags">
1455
-
1456
- </div><table class="source_code">
1457
- <tr>
1458
- <td>
1459
- <pre class="lines">
1460
-
1461
-
1462
- 97
1463
- 98
1464
- 99
1465
- 100</pre>
1466
- </td>
1467
- <td>
1468
- <pre class="code"><span class="info file"># File 'lib/sprout/generator/base.rb', line 97</span>
1469
-
1470
- <span class='kw'>def</span> <span class='id resolve_template'>resolve_template</span> <span class='id content'>content</span>
1471
- <span class='id require'>require</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>erb</span><span class='tstring_end'>'</span></span>
1472
- <span class='const'>ERB</span><span class='period'>.</span><span class='id new'>new</span><span class='lparen'>(</span><span class='id content'>content</span><span class='comma'>,</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>&gt;</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id result'>result</span><span class='lparen'>(</span><span class='id binding'>binding</span><span class='rparen'>)</span>
1473
- <span class='kw'>end</span></pre>
1474
- </td>
1475
- </tr>
1476
- </table>
1477
- </div>
1478
-
1479
- <div class="method_details ">
1480
- <p class="signature " id="say-instance_method">
1481
-
1482
- - (<tt>Object</tt>) <strong>say</strong>(message)
1483
-
1484
-
1485
-
1486
- </p><table class="source_code">
1487
- <tr>
1488
- <td>
1489
- <pre class="lines">
1490
-
1491
-
1492
- 86
1493
- 87
1494
- 88</pre>
1495
- </td>
1496
- <td>
1497
- <pre class="code"><span class="info file"># File 'lib/sprout/generator/base.rb', line 86</span>
1498
-
1499
- <span class='kw'>def</span> <span class='id say'>say</span> <span class='id message'>message</span>
1500
- <span class='id logger'>logger</span><span class='period'>.</span><span class='id puts'>puts</span> <span class='id message'>message</span><span class='period'>.</span><span class='id gsub'>gsub</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id path'>path</span><span class='rbrace'>}</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>.</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='id quiet'>quiet</span>
1501
- <span class='kw'>end</span></pre>
1502
- </td>
1503
- </tr>
1504
- </table>
1505
- </div>
1506
-
1507
- <div class="method_details ">
1508
- <p class="signature " id="template-instance_method">
1509
-
1510
- - (<tt>Object</tt>) <strong>template</strong>(name, template = nil) <span class="extras">(protected)</span>
1511
-
1512
-
1513
-
1514
- </p><table class="source_code">
1515
- <tr>
1516
- <td>
1517
- <pre class="lines">
1518
-
1519
-
1520
- 135
1521
- 136
1522
- 137</pre>
1523
- </td>
1524
- <td>
1525
- <pre class="code"><span class="info file"># File 'lib/sprout/generator/base.rb', line 135</span>
1526
-
1527
- <span class='kw'>def</span> <span class='id template'>template</span> <span class='id name'>name</span><span class='comma'>,</span> <span class='id template'>template</span><span class='op'>=</span><span class='kw'>nil</span>
1528
- <span class='ivar'>@command</span><span class='period'>.</span><span class='id template'>template</span> <span class='id name'>name</span><span class='comma'>,</span> <span class='id template'>template</span>
1529
- <span class='kw'>end</span></pre>
1530
- </td>
1531
- </tr>
1532
- </table>
1533
- </div>
1534
-
1535
- <div class="method_details ">
1536
- <p class="signature " id="template_paths-instance_method">
1537
-
1538
- - (<tt>Object</tt>) <strong>template_paths</strong>
1539
-
1540
-
1541
-
1542
- </p><div class="docstring">
1543
- <div class="discussion">
1544
-
1545
- <p>Returns a collection of templates that were provided on the command line,
1546
- followed by templates that are created by a concrete generator, followed
1547
- by the Sprout::Generator.search_paths + 'templates' folders.</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
- 108
1561
- 109
1562
- 110
1563
- 111</pre>
1564
- </td>
1565
- <td>
1566
- <pre class="code"><span class="info file"># File 'lib/sprout/generator/base.rb', line 108</span>
1567
-
1568
- <span class='kw'>def</span> <span class='id template_paths'>template_paths</span>
1569
- <span class='id templates'>templates</span> <span class='op'>&lt;&lt;</span> <span class='const'>Sprout</span><span class='op'>::</span><span class='const'>Generator</span><span class='op'>::</span><span class='id template_folder_for'>template_folder_for</span><span class='lparen'>(</span><span class='kw'>self</span><span class='rparen'>)</span>
1570
- <span class='id templates'>templates</span><span class='period'>.</span><span class='id concat'>concat</span> <span class='id default_search_paths'>default_search_paths</span>
1571
- <span class='kw'>end</span></pre>
1572
- </td>
1573
- </tr>
1574
- </table>
1575
- </div>
1576
-
1577
- <div class="method_details ">
1578
- <p class="signature " id="unexecute-instance_method">
1579
-
1580
- - (<tt>Object</tt>) <strong>unexecute</strong>
1581
-
1582
-
1583
-
1584
- </p><div class="docstring">
1585
- <div class="discussion">
1586
-
1587
- <p>Rollback the generator</p>
1588
-
1589
-
1590
- </div>
1591
- </div>
1592
- <div class="tags">
1593
-
1594
- </div><table class="source_code">
1595
- <tr>
1596
- <td>
1597
- <pre class="lines">
1598
-
1599
-
1600
- 82
1601
- 83
1602
- 84</pre>
1603
- </td>
1604
- <td>
1605
- <pre class="code"><span class="info file"># File 'lib/sprout/generator/base.rb', line 82</span>
1606
-
1607
- <span class='kw'>def</span> <span class='id unexecute'>unexecute</span>
1608
- <span class='id prepare_command'>prepare_command</span><span class='period'>.</span><span class='id unexecute'>unexecute</span>
1609
- <span class='kw'>end</span></pre>
1610
- </td>
1611
- </tr>
1612
- </table>
1613
- </div>
1614
-
1615
- </div>
1616
-
1617
- </div>
1618
-
1619
- <div id="footer">
1620
- Generated on Wed Dec 22 11:58:35 2010 by
1621
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1622
- 0.6.3 (ruby-1.9.2).
1623
- </div>
1624
-
1625
- </body>
1626
- </html>