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,643 @@
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::Generator</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/generator/base_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
42
+ class="thickbox" title="lib/sprout/generator/base.rb">lib/sprout/generator/base.rb</a></li>
43
+
44
+ <li><a href="../lib/sprout/generator/command_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
45
+ class="thickbox" title="lib/sprout/generator/command.rb">lib/sprout/generator/command.rb</a></li>
46
+
47
+ <li><a href="../lib/sprout/generator/directory_manifest_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
48
+ class="thickbox" title="lib/sprout/generator/directory_manifest.rb">lib/sprout/generator/directory_manifest.rb</a></li>
49
+
50
+ <li><a href="../lib/sprout/generator/file_manifest_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
51
+ class="thickbox" title="lib/sprout/generator/file_manifest.rb">lib/sprout/generator/file_manifest.rb</a></li>
52
+
53
+ <li><a href="../lib/sprout/generator/manifest_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
54
+ class="thickbox" title="lib/sprout/generator/manifest.rb">lib/sprout/generator/manifest.rb</a></li>
55
+
56
+ <li><a href="../lib/sprout/generator/template_manifest_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
57
+ class="thickbox" title="lib/sprout/generator/template_manifest.rb">lib/sprout/generator/template_manifest.rb</a></li>
58
+
59
+ </ul>
60
+ </div>
61
+ </div>
62
+
63
+
64
+ </div>
65
+
66
+ <div id="class-metadata">
67
+
68
+ <!-- Parent Class -->
69
+
70
+
71
+ <!-- Namespace Contents -->
72
+
73
+ <div id="namespace-list-section" class="section">
74
+ <h3 class="section-header">Namespace</h3>
75
+ <ul class="link-list">
76
+
77
+ <li><span class="type">CLASS</span> <a href="Generator/Base.html">Sprout::Generator::Base</a></li>
78
+
79
+ <li><span class="type">CLASS</span> <a href="Generator/Command.html">Sprout::Generator::Command</a></li>
80
+
81
+ <li><span class="type">CLASS</span> <a href="Generator/DirectoryManifest.html">Sprout::Generator::DirectoryManifest</a></li>
82
+
83
+ <li><span class="type">CLASS</span> <a href="Generator/FileManifest.html">Sprout::Generator::FileManifest</a></li>
84
+
85
+ <li><span class="type">CLASS</span> <a href="Generator/Manifest.html">Sprout::Generator::Manifest</a></li>
86
+
87
+ <li><span class="type">CLASS</span> <a href="Generator/TemplateManifest.html">Sprout::Generator::TemplateManifest</a></li>
88
+
89
+ </ul>
90
+ </div>
91
+
92
+
93
+ <!-- Method Quickref -->
94
+
95
+ <div id="method-list-section" class="section">
96
+ <h3 class="section-header">Methods</h3>
97
+ <ul class="link-list">
98
+
99
+ <li><a href="#method-c-configure_instance">::configure_instance</a></li>
100
+
101
+ <li><a href="#method-c-create_search_paths">::create_search_paths</a></li>
102
+
103
+ <li><a href="#method-c-generator_paths">::generator_paths</a></li>
104
+
105
+ <li><a href="#method-c-register">::register</a></li>
106
+
107
+ <li><a href="#method-c-search_paths">::search_paths</a></li>
108
+
109
+ <li><a href="#method-c-template_folder_for">::template_folder_for</a></li>
110
+
111
+ <li><a href="#method-c-update_registered_entities">::update_registered_entities</a></li>
112
+
113
+ </ul>
114
+ </div>
115
+
116
+
117
+ <!-- Included Modules -->
118
+
119
+ <div id="includes-section" class="section">
120
+ <h3 class="section-header">Included Modules</h3>
121
+ <ul class="link-list">
122
+
123
+
124
+ <li><span class="include">RubyFeature</span></li>
125
+
126
+
127
+ </ul>
128
+ </div>
129
+
130
+ </div>
131
+
132
+ <div id="project-metadata">
133
+
134
+
135
+
136
+ <div id="classindex-section" class="section project-section">
137
+ <h3 class="section-header">Class Index
138
+ <span class="search-toggle"><img src="../images/find.png"
139
+ height="16" width="16" alt="[+]"
140
+ title="show/hide quicksearch" /></span></h3>
141
+ <form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
142
+ <fieldset>
143
+ <legend>Quicksearch</legend>
144
+ <input type="text" name="quicksearch" value=""
145
+ class="quicksearch-field" />
146
+ </fieldset>
147
+ </form>
148
+
149
+ <ul class="link-list">
150
+
151
+ <li><a href="../Sprout/ArchiveUnpacker.html">Sprout::ArchiveUnpacker</a></li>
152
+
153
+ <li><a href="../Sprout/Base.html">Sprout::Base</a></li>
154
+
155
+ <li><a href="../Sprout/Base/ClassMethods.html">Sprout::Base::ClassMethods</a></li>
156
+
157
+ <li><a href="../Sprout/Concern.html">Sprout::Concern</a></li>
158
+
159
+ <li><a href="../Sprout/Errors.html">Sprout::Errors</a></li>
160
+
161
+ <li><a href="../Sprout/Errors/ArchiveUnpackerError.html">Sprout::Errors::ArchiveUnpackerError</a></li>
162
+
163
+ <li><a href="../Sprout/Errors/DestinationExistsError.html">Sprout::Errors::DestinationExistsError</a></li>
164
+
165
+ <li><a href="../Sprout/Errors/DuplicateMemberError.html">Sprout::Errors::DuplicateMemberError</a></li>
166
+
167
+ <li><a href="../Sprout/Errors/ExecutableError.html">Sprout::Errors::ExecutableError</a></li>
168
+
169
+ <li><a href="../Sprout/Errors/ExecutableRegistrationError.html">Sprout::Errors::ExecutableRegistrationError</a></li>
170
+
171
+ <li><a href="../Sprout/Errors/ExecutionError.html">Sprout::Errors::ExecutionError</a></li>
172
+
173
+ <li><a href="../Sprout/Errors/GeneratorError.html">Sprout::Errors::GeneratorError</a></li>
174
+
175
+ <li><a href="../Sprout/Errors/InvalidArgumentError.html">Sprout::Errors::InvalidArgumentError</a></li>
176
+
177
+ <li><a href="../Sprout/Errors/LoadError.html">Sprout::Errors::LoadError</a></li>
178
+
179
+ <li><a href="../Sprout/Errors/MissingArgumentError.html">Sprout::Errors::MissingArgumentError</a></li>
180
+
181
+ <li><a href="../Sprout/Errors/MissingExecutableError.html">Sprout::Errors::MissingExecutableError</a></li>
182
+
183
+ <li><a href="../Sprout/Errors/MissingGeneratorError.html">Sprout::Errors::MissingGeneratorError</a></li>
184
+
185
+ <li><a href="../Sprout/Errors/MissingTemplateError.html">Sprout::Errors::MissingTemplateError</a></li>
186
+
187
+ <li><a href="../Sprout/Errors/ProcessRunnerError.html">Sprout::Errors::ProcessRunnerError</a></li>
188
+
189
+ <li><a href="../Sprout/Errors/RemoteFileLoaderError.html">Sprout::Errors::RemoteFileLoaderError</a></li>
190
+
191
+ <li><a href="../Sprout/Errors/SproutError.html">Sprout::Errors::SproutError</a></li>
192
+
193
+ <li><a href="../Sprout/Errors/UnknownArchiveType.html">Sprout::Errors::UnknownArchiveType</a></li>
194
+
195
+ <li><a href="../Sprout/Errors/UsageError.html">Sprout::Errors::UsageError</a></li>
196
+
197
+ <li><a href="../Sprout/Errors/ValidationError.html">Sprout::Errors::ValidationError</a></li>
198
+
199
+ <li><a href="../Sprout/Errors/VersionRequirementNotMetError.html">Sprout::Errors::VersionRequirementNotMetError</a></li>
200
+
201
+ <li><a href="../Sprout/Executable.html">Sprout::Executable</a></li>
202
+
203
+ <li><a href="../Sprout/Executable/Boolean.html">Sprout::Executable::Boolean</a></li>
204
+
205
+ <li><a href="../Sprout/Executable/ClassMethods.html">Sprout::Executable::ClassMethods</a></li>
206
+
207
+ <li><a href="../Sprout/Executable/CollectionParam.html">Sprout::Executable::CollectionParam</a></li>
208
+
209
+ <li><a href="../Sprout/Executable/FileParam.html">Sprout::Executable::FileParam</a></li>
210
+
211
+ <li><a href="../Sprout/Executable/Files.html">Sprout::Executable::Files</a></li>
212
+
213
+ <li><a href="../Sprout/Executable/InstanceMethods.html">Sprout::Executable::InstanceMethods</a></li>
214
+
215
+ <li><a href="../Sprout/Executable/Number.html">Sprout::Executable::Number</a></li>
216
+
217
+ <li><a href="../Sprout/Executable/Param.html">Sprout::Executable::Param</a></li>
218
+
219
+ <li><a href="../Sprout/Executable/ParameterFactory.html">Sprout::Executable::ParameterFactory</a></li>
220
+
221
+ <li><a href="../Sprout/Executable/Path.html">Sprout::Executable::Path</a></li>
222
+
223
+ <li><a href="../Sprout/Executable/Paths.html">Sprout::Executable::Paths</a></li>
224
+
225
+ <li><a href="../Sprout/Executable/StringParam.html">Sprout::Executable::StringParam</a></li>
226
+
227
+ <li><a href="../Sprout/Executable/Strings.html">Sprout::Executable::Strings</a></li>
228
+
229
+ <li><a href="../Sprout/Executable/Url.html">Sprout::Executable::Url</a></li>
230
+
231
+ <li><a href="../Sprout/Executable/Urls.html">Sprout::Executable::Urls</a></li>
232
+
233
+ <li><a href="../Sprout/FileTarget.html">Sprout::FileTarget</a></li>
234
+
235
+ <li><a href="../Sprout/Generator.html">Sprout::Generator</a></li>
236
+
237
+ <li><a href="../Sprout/Generator/Base.html">Sprout::Generator::Base</a></li>
238
+
239
+ <li><a href="../Sprout/Generator/Command.html">Sprout::Generator::Command</a></li>
240
+
241
+ <li><a href="../Sprout/Generator/DirectoryManifest.html">Sprout::Generator::DirectoryManifest</a></li>
242
+
243
+ <li><a href="../Sprout/Generator/FileManifest.html">Sprout::Generator::FileManifest</a></li>
244
+
245
+ <li><a href="../Sprout/Generator/Manifest.html">Sprout::Generator::Manifest</a></li>
246
+
247
+ <li><a href="../Sprout/Generator/TemplateManifest.html">Sprout::Generator::TemplateManifest</a></li>
248
+
249
+ <li><a href="../Sprout/GeneratorGenerator.html">Sprout::GeneratorGenerator</a></li>
250
+
251
+ <li><a href="../Sprout/Library.html">Sprout::Library</a></li>
252
+
253
+ <li><a href="../Sprout/LibraryGenerator.html">Sprout::LibraryGenerator</a></li>
254
+
255
+ <li><a href="../Sprout/Platform.html">Sprout::Platform</a></li>
256
+
257
+ <li><a href="../Sprout/ProcessRunner.html">Sprout::ProcessRunner</a></li>
258
+
259
+ <li><a href="../Sprout/RDocParser.html">Sprout::RDocParser</a></li>
260
+
261
+ <li><a href="../Sprout/RemoteFileLoader.html">Sprout::RemoteFileLoader</a></li>
262
+
263
+ <li><a href="../Sprout/RemoteFileTarget.html">Sprout::RemoteFileTarget</a></li>
264
+
265
+ <li><a href="../Sprout/RubyFeature.html">Sprout::RubyFeature</a></li>
266
+
267
+ <li><a href="../Sprout/RubyFeature/ClassMethods.html">Sprout::RubyFeature::ClassMethods</a></li>
268
+
269
+ <li><a href="../Sprout/RubyGenerator.html">Sprout::RubyGenerator</a></li>
270
+
271
+ <li><a href="../Sprout/Specification.html">Sprout::Specification</a></li>
272
+
273
+ <li><a href="../Sprout/System.html">Sprout::System</a></li>
274
+
275
+ <li><a href="../Sprout/System/BaseSystem.html">Sprout::System::BaseSystem</a></li>
276
+
277
+ <li><a href="../Sprout/System/JavaSystem.html">Sprout::System::JavaSystem</a></li>
278
+
279
+ <li><a href="../Sprout/System/OSXSystem.html">Sprout::System::OSXSystem</a></li>
280
+
281
+ <li><a href="../Sprout/System/UnixSystem.html">Sprout::System::UnixSystem</a></li>
282
+
283
+ <li><a href="../Sprout/System/VistaSystem.html">Sprout::System::VistaSystem</a></li>
284
+
285
+ <li><a href="../Sprout/System/WinNixSystem.html">Sprout::System::WinNixSystem</a></li>
286
+
287
+ <li><a href="../Sprout/System/WinSystem.html">Sprout::System::WinSystem</a></li>
288
+
289
+ <li><a href="../Sprout/ToolGenerator.html">Sprout::ToolGenerator</a></li>
290
+
291
+ <li><a href="../<.html"><</a></li>
292
+
293
+ <li><a href="../Dir.html">Dir</a></li>
294
+
295
+ <li><a href="../Object.html">Object</a></li>
296
+
297
+ <li><a href="../String.html">String</a></li>
298
+
299
+ </ul>
300
+ <div id="no-class-search-results" style="display: none;">No matching classes.</div>
301
+ </div>
302
+
303
+
304
+ </div>
305
+ </div>
306
+
307
+ <div id="documentation">
308
+ <h1 class="module">Sprout::Generator</h1>
309
+
310
+ <div id="description">
311
+
312
+ </div>
313
+
314
+ <!-- Constants -->
315
+
316
+
317
+ <!-- Attributes -->
318
+
319
+
320
+ <!-- Methods -->
321
+
322
+ <div id="public-class-method-details" class="method-section section">
323
+ <h3 class="section-header">Public Class Methods</h3>
324
+
325
+
326
+ <div id="register-method" class="method-detail ">
327
+ <a name="method-c-register"></a>
328
+
329
+ <div class="method-heading">
330
+
331
+ <span class="method-name">register</span><span
332
+ class="method-args">(generator_class, templates_path=nil)</span>
333
+ <span class="method-click-advice">click to toggle source</span>
334
+
335
+ </div>
336
+
337
+ <div class="method-description">
338
+
339
+
340
+
341
+
342
+
343
+ <div class="method-source-code"
344
+ id="register-source">
345
+ <pre>
346
+ <span class="ruby-comment cmt"># File lib/sprout/generator/base.rb, line 8</span>
347
+ 8: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">register</span> <span class="ruby-identifier">generator_class</span>, <span class="ruby-identifier">templates_path</span>=<span class="ruby-keyword kw">nil</span>
348
+ 9: <span class="ruby-identifier">generator_paths</span> <span class="ruby-operator">&lt;&lt;</span> { <span class="ruby-value">:class</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">generator_class</span>, <span class="ruby-value">:templates</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">templates_path</span> } <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">templates_path</span>.<span class="ruby-identifier">nil?</span>
349
+ 10: <span class="ruby-keyword kw">super</span>(<span class="ruby-identifier">generator_class</span>)
350
+ 11: <span class="ruby-keyword kw">end</span></pre>
351
+ </div>
352
+
353
+ </div>
354
+
355
+
356
+
357
+
358
+ </div>
359
+
360
+
361
+ <div id="search-paths-method" class="method-detail ">
362
+ <a name="method-c-search_paths"></a>
363
+
364
+ <div class="method-heading">
365
+
366
+ <span class="method-name">search_paths</span><span
367
+ class="method-args">()</span>
368
+ <span class="method-click-advice">click to toggle source</span>
369
+
370
+ </div>
371
+
372
+ <div class="method-description">
373
+
374
+ <p>
375
+ Returns a new collection of paths to search within for generator
376
+ declarations and more importantly, folders named, &#8216;templates&#8217;.
377
+ </p>
378
+ <p>
379
+ The collection of <a
380
+ href="Generator.html#method-c-search_paths">search_paths</a> will be a
381
+ subset of the following that will include only those directories that
382
+ exist:
383
+ </p>
384
+ <pre>
385
+ ./config/generators
386
+ ./vendor/generators
387
+ ~/Library/Sprouts/1.0/generators # OS X only
388
+ ~/.sprouts/1.0/generators # Unix only
389
+ [USER_HOME]/Application Data/Sprouts/cache/1.0/generators # Windows only
390
+ ENV['SPROUT_GENERATORS'] # Only if defined
391
+ [Generator Declaration __FILE__]/templates
392
+ </pre>
393
+ <p>
394
+ When the generators attempt to resolve templates, each of the preceding
395
+ folders will be scanned for a child directory named
396
+ &#8216;templates&#8217;. Within that directory, the requested template name
397
+ will be scanned and the first found template file will be used. This
398
+ process will be repeated for each template file that is requested.
399
+ </p>
400
+ <p>
401
+ The idea is that you may wish to override some template files that a
402
+ generator creates, but leave others unchanged.
403
+ </p>
404
+
405
+
406
+
407
+ <div class="method-source-code"
408
+ id="search-paths-source">
409
+ <pre>
410
+ <span class="ruby-comment cmt"># File lib/sprout/generator/base.rb, line 50</span>
411
+ 50: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">search_paths</span>
412
+ 51: <span class="ruby-comment cmt"># NOTE: Do not cache this list, specific generators</span>
413
+ 52: <span class="ruby-comment cmt"># will modify it with their own lookups</span>
414
+ 53: <span class="ruby-identifier">create_search_paths</span>.<span class="ruby-identifier">select</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">path</span><span class="ruby-operator">|</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span>(<span class="ruby-identifier">path</span>) }
415
+ 54: <span class="ruby-keyword kw">end</span></pre>
416
+ </div>
417
+
418
+ </div>
419
+
420
+
421
+
422
+
423
+ </div>
424
+
425
+
426
+ <div id="template-folder-for-method" class="method-detail ">
427
+ <a name="method-c-template_folder_for"></a>
428
+
429
+ <div class="method-heading">
430
+
431
+ <span class="method-name">template_folder_for</span><span
432
+ class="method-args">(clazz)</span>
433
+ <span class="method-click-advice">click to toggle source</span>
434
+
435
+ </div>
436
+
437
+ <div class="method-description">
438
+
439
+
440
+
441
+
442
+
443
+ <div class="method-source-code"
444
+ id="template-folder-for-source">
445
+ <pre>
446
+ <span class="ruby-comment cmt"># File lib/sprout/generator/base.rb, line 13</span>
447
+ 13: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">template_folder_for</span> <span class="ruby-identifier">clazz</span>
448
+ 14: <span class="ruby-comment cmt"># Search the potential matches in reverse order</span>
449
+ 15: <span class="ruby-comment cmt"># because subclasses have registered AFTER their</span>
450
+ 16: <span class="ruby-comment cmt"># superclasses and superclasses match the ===</span>
451
+ 17: <span class="ruby-comment cmt"># check...</span>
452
+ 18: <span class="ruby-identifier">generator_paths</span>.<span class="ruby-identifier">reverse</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">options</span><span class="ruby-operator">|</span>
453
+ 19: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-value">:class</span>] <span class="ruby-operator">===</span> <span class="ruby-identifier">clazz</span>
454
+ 20: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">options</span>[<span class="ruby-value">:templates</span>]
455
+ 21: <span class="ruby-keyword kw">end</span>
456
+ 22: <span class="ruby-keyword kw">end</span>
457
+ 23: <span class="ruby-keyword kw">nil</span>
458
+ 24: <span class="ruby-keyword kw">end</span></pre>
459
+ </div>
460
+
461
+ </div>
462
+
463
+
464
+
465
+
466
+ </div>
467
+
468
+
469
+ </div>
470
+
471
+ <div id="private-class-method-details" class="method-section section">
472
+ <h3 class="section-header">Private Class Methods</h3>
473
+
474
+
475
+ <div id="configure-instance-method" class="method-detail ">
476
+ <a name="method-c-configure_instance"></a>
477
+
478
+ <div class="method-heading">
479
+
480
+ <span class="method-name">configure_instance</span><span
481
+ class="method-args">(generator)</span>
482
+ <span class="method-click-advice">click to toggle source</span>
483
+
484
+ </div>
485
+
486
+ <div class="method-description">
487
+
488
+
489
+
490
+
491
+
492
+ <div class="method-source-code"
493
+ id="configure-instance-source">
494
+ <pre>
495
+ <span class="ruby-comment cmt"># File lib/sprout/generator/base.rb, line 78</span>
496
+ 78: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">configure_instance</span> <span class="ruby-identifier">generator</span>
497
+ 79: <span class="ruby-identifier">generator</span>
498
+ 80: <span class="ruby-keyword kw">end</span></pre>
499
+ </div>
500
+
501
+ </div>
502
+
503
+
504
+
505
+
506
+ </div>
507
+
508
+
509
+ <div id="create-search-paths-method" class="method-detail ">
510
+ <a name="method-c-create_search_paths"></a>
511
+
512
+ <div class="method-heading">
513
+
514
+ <span class="method-name">create_search_paths</span><span
515
+ class="method-args">()</span>
516
+ <span class="method-click-advice">click to toggle source</span>
517
+
518
+ </div>
519
+
520
+ <div class="method-description">
521
+
522
+
523
+
524
+
525
+
526
+ <div class="method-source-code"
527
+ id="create-search-paths-source">
528
+ <pre>
529
+ <span class="ruby-comment cmt"># File lib/sprout/generator/base.rb, line 58</span>
530
+ 58: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">create_search_paths</span>
531
+ 59: <span class="ruby-identifier">paths</span> = [
532
+ 60: <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">'config'</span>, <span class="ruby-value str">'generators'</span>),
533
+ 61: <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">'vendor'</span>, <span class="ruby-value str">'generators'</span>),
534
+ 62: <span class="ruby-constant">Sprout</span>.<span class="ruby-identifier">generator_cache</span>
535
+ 63: ]
536
+ 64: <span class="ruby-identifier">paths</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-constant">ENV</span>[<span class="ruby-value str">'SPROUT_GENERATORS'</span>] <span class="ruby-keyword kw">unless</span> <span class="ruby-constant">ENV</span>[<span class="ruby-value str">'SPROUT_GENERATORS'</span>].<span class="ruby-identifier">nil?</span>
537
+ 65: <span class="ruby-identifier">paths</span>
538
+ 66: <span class="ruby-keyword kw">end</span></pre>
539
+ </div>
540
+
541
+ </div>
542
+
543
+
544
+
545
+
546
+ </div>
547
+
548
+
549
+ <div id="generator-paths-method" class="method-detail ">
550
+ <a name="method-c-generator_paths"></a>
551
+
552
+ <div class="method-heading">
553
+
554
+ <span class="method-name">generator_paths</span><span
555
+ class="method-args">()</span>
556
+ <span class="method-click-advice">click to toggle source</span>
557
+
558
+ </div>
559
+
560
+ <div class="method-description">
561
+
562
+
563
+
564
+
565
+
566
+ <div class="method-source-code"
567
+ id="generator-paths-source">
568
+ <pre>
569
+ <span class="ruby-comment cmt"># File lib/sprout/generator/base.rb, line 82</span>
570
+ 82: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">generator_paths</span>
571
+ 83: <span class="ruby-ivar">@generator_paths</span> <span class="ruby-operator">||=</span> []
572
+ 84: <span class="ruby-keyword kw">end</span></pre>
573
+ </div>
574
+
575
+ </div>
576
+
577
+
578
+
579
+
580
+ </div>
581
+
582
+
583
+ <div id="update-registered-entities-method" class="method-detail ">
584
+ <a name="method-c-update_registered_entities"></a>
585
+
586
+ <div class="method-heading">
587
+
588
+ <span class="method-name">update_registered_entities</span><span
589
+ class="method-args">()</span>
590
+ <span class="method-click-advice">click to toggle source</span>
591
+
592
+ </div>
593
+
594
+ <div class="method-description">
595
+
596
+ <p>
597
+ I know this seems weird - but we can&#8217;t instantiate the classes during
598
+ registration because they register before they&#8217;ve been fully
599
+ interpreted...
600
+ </p>
601
+
602
+
603
+
604
+ <div class="method-source-code"
605
+ id="update-registered-entities-source">
606
+ <pre>
607
+ <span class="ruby-comment cmt"># File lib/sprout/generator/base.rb, line 72</span>
608
+ 72: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">update_registered_entities</span>
609
+ 73: <span class="ruby-identifier">registered_entities</span>.<span class="ruby-identifier">collect!</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">gen</span><span class="ruby-operator">|</span>
610
+ 74: (<span class="ruby-identifier">gen</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Class</span>)) <span class="ruby-operator">?</span> <span class="ruby-identifier">gen</span>.<span class="ruby-identifier">new</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">gen</span>
611
+ 75: <span class="ruby-keyword kw">end</span>
612
+ 76: <span class="ruby-keyword kw">end</span></pre>
613
+ </div>
614
+
615
+ </div>
616
+
617
+
618
+
619
+
620
+ </div>
621
+
622
+
623
+ </div>
624
+
625
+
626
+ </div>
627
+
628
+
629
+ <div id="rdoc-debugging-section-dump" class="debugging-section">
630
+
631
+ <p>Disabled; run with --debug to generate this.</p>
632
+
633
+ </div>
634
+
635
+ <div id="validator-badges">
636
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
637
+ <p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
638
+ Rdoc Generator</a> 1.1.6</small>.</p>
639
+ </div>
640
+
641
+ </body>
642
+ </html>
643
+