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.
- data/lib/sprout/executable.rb +37 -10
- data/lib/sprout/generator/base.rb +17 -0
- data/lib/sprout/ruby_feature.rb +1 -1
- data/lib/sprout/version.rb +1 -1
- data/rdoc/<.html +274 -0
- data/rdoc/Dir.html +387 -0
- data/rdoc/Object.html +344 -0
- data/rdoc/Sprout.html +440 -0
- data/rdoc/Sprout/ArchiveUnpacker.html +1045 -0
- data/rdoc/Sprout/Base.html +283 -0
- data/rdoc/Sprout/Base/ClassMethods.html +474 -0
- data/rdoc/Sprout/Concern.html +415 -0
- data/rdoc/Sprout/Errors.html +324 -0
- data/rdoc/Sprout/Errors/ArchiveUnpackerError.html +284 -0
- data/rdoc/Sprout/Errors/DestinationExistsError.html +286 -0
- data/rdoc/Sprout/Errors/DuplicateMemberError.html +284 -0
- data/rdoc/Sprout/Errors/ExecutableError.html +285 -0
- data/rdoc/Sprout/Errors/ExecutableRegistrationError.html +284 -0
- data/rdoc/Sprout/Errors/ExecutionError.html +284 -0
- data/rdoc/Sprout/Errors/GeneratorError.html +284 -0
- data/rdoc/Sprout/Errors/InvalidArgumentError.html +284 -0
- data/rdoc/Sprout/Errors/LoadError.html +284 -0
- data/rdoc/Sprout/Errors/MissingArgumentError.html +284 -0
- data/rdoc/Sprout/Errors/MissingExecutableError.html +284 -0
- data/rdoc/Sprout/Errors/MissingGeneratorError.html +285 -0
- data/rdoc/Sprout/Errors/MissingTemplateError.html +285 -0
- data/rdoc/Sprout/Errors/ProcessRunnerError.html +284 -0
- data/rdoc/Sprout/Errors/RemoteFileLoaderError.html +284 -0
- data/rdoc/Sprout/Errors/SproutError.html +284 -0
- data/rdoc/Sprout/Errors/UnknownArchiveType.html +285 -0
- data/rdoc/Sprout/Errors/UsageError.html +284 -0
- data/rdoc/Sprout/Errors/ValidationError.html +284 -0
- data/rdoc/Sprout/Errors/VersionRequirementNotMetError.html +284 -0
- data/rdoc/Sprout/Executable.html +549 -0
- data/rdoc/Sprout/Executable/Boolean.html +445 -0
- data/rdoc/Sprout/Executable/ClassMethods.html +713 -0
- data/rdoc/Sprout/Executable/CollectionParam.html +501 -0
- data/rdoc/Sprout/Executable/FileParam.html +512 -0
- data/rdoc/Sprout/Executable/Files.html +385 -0
- data/rdoc/Sprout/Executable/InstanceMethods.html +1597 -0
- data/rdoc/Sprout/Executable/Number.html +284 -0
- data/rdoc/Sprout/Executable/Param.html +1660 -0
- data/rdoc/Sprout/Executable/ParameterFactory.html +345 -0
- data/rdoc/Sprout/Executable/Path.html +339 -0
- data/rdoc/Sprout/Executable/Paths.html +339 -0
- data/rdoc/Sprout/Executable/StringParam.html +333 -0
- data/rdoc/Sprout/Executable/Strings.html +295 -0
- data/rdoc/Sprout/Executable/Url.html +284 -0
- data/rdoc/Sprout/Executable/Urls.html +284 -0
- data/rdoc/Sprout/FileTarget.html +660 -0
- data/rdoc/Sprout/Generator.html +643 -0
- data/rdoc/Sprout/Generator/Base.html +1143 -0
- data/rdoc/Sprout/Generator/Command.html +604 -0
- data/rdoc/Sprout/Generator/DirectoryManifest.html +561 -0
- data/rdoc/Sprout/Generator/FileManifest.html +545 -0
- data/rdoc/Sprout/Generator/Manifest.html +387 -0
- data/rdoc/Sprout/Generator/TemplateManifest.html +331 -0
- data/rdoc/Sprout/GeneratorGenerator.html +358 -0
- data/rdoc/Sprout/Library.html +646 -0
- data/rdoc/Sprout/LibraryGenerator.html +368 -0
- data/rdoc/Sprout/Log.html +281 -0
- data/rdoc/Sprout/Platform.html +610 -0
- data/rdoc/Sprout/ProcessRunner.html +1145 -0
- data/rdoc/Sprout/ProgressBar.html +281 -0
- data/rdoc/Sprout/ProgressBarImpl.html +281 -0
- data/rdoc/Sprout/ProgressBarManager.html +281 -0
- data/rdoc/Sprout/ProgressBarOutputStream.html +281 -0
- data/rdoc/Sprout/RDocParser.html +702 -0
- data/rdoc/Sprout/RemoteFileLoader.html +537 -0
- data/rdoc/Sprout/RemoteFileTarget.html +741 -0
- data/rdoc/Sprout/ReversedProgressBar.html +281 -0
- data/rdoc/Sprout/RubyFeature.html +324 -0
- data/rdoc/Sprout/RubyFeature/ClassMethods.html +821 -0
- data/rdoc/Sprout/RubyGenerator.html +576 -0
- data/rdoc/Sprout/Specification.html +915 -0
- data/rdoc/Sprout/System.html +383 -0
- data/rdoc/Sprout/System/BaseSystem.html +1173 -0
- data/rdoc/Sprout/System/JavaSystem.html +284 -0
- data/rdoc/Sprout/System/OSXSystem.html +419 -0
- data/rdoc/Sprout/System/ThreadMock.html +281 -0
- data/rdoc/Sprout/System/UnixSystem.html +583 -0
- data/rdoc/Sprout/System/VistaSystem.html +367 -0
- data/rdoc/Sprout/System/WinNixSystem.html +417 -0
- data/rdoc/Sprout/System/WinSystem.html +672 -0
- data/rdoc/Sprout/ToolGenerator.html +376 -0
- data/rdoc/Sprout/VERSION.html +274 -0
- data/rdoc/SproutTestCase.html +279 -0
- data/rdoc/String.html +411 -0
- data/rdoc/created.rid +61 -0
- data/rdoc/index.html +795 -0
- data/rdoc/lib/sprout/archive_unpacker_rb.html +56 -0
- data/rdoc/lib/sprout/base_rb.html +111 -0
- data/rdoc/lib/sprout/concern_rb.html +52 -0
- data/rdoc/lib/sprout/dir_rb.html +52 -0
- data/rdoc/lib/sprout/errors_rb.html +52 -0
- data/rdoc/lib/sprout/executable/boolean_rb.html +52 -0
- data/rdoc/lib/sprout/executable/collection_param_rb.html +52 -0
- data/rdoc/lib/sprout/executable/file_param_rb.html +52 -0
- data/rdoc/lib/sprout/executable/files_rb.html +52 -0
- data/rdoc/lib/sprout/executable/number_rb.html +52 -0
- data/rdoc/lib/sprout/executable/param_rb.html +52 -0
- data/rdoc/lib/sprout/executable/parameter_factory_rb.html +52 -0
- data/rdoc/lib/sprout/executable/path_rb.html +52 -0
- data/rdoc/lib/sprout/executable/paths_rb.html +52 -0
- data/rdoc/lib/sprout/executable/string_param_rb.html +52 -0
- data/rdoc/lib/sprout/executable/strings_rb.html +52 -0
- data/rdoc/lib/sprout/executable/url_rb.html +52 -0
- data/rdoc/lib/sprout/executable/urls_rb.html +52 -0
- data/rdoc/lib/sprout/executable_rb.html +78 -0
- data/rdoc/lib/sprout/file_target_rb.html +52 -0
- data/rdoc/lib/sprout/generator/base_rb.html +54 -0
- data/rdoc/lib/sprout/generator/command_rb.html +52 -0
- data/rdoc/lib/sprout/generator/directory_manifest_rb.html +52 -0
- data/rdoc/lib/sprout/generator/file_manifest_rb.html +52 -0
- data/rdoc/lib/sprout/generator/manifest_rb.html +52 -0
- data/rdoc/lib/sprout/generator/template_manifest_rb.html +52 -0
- data/rdoc/lib/sprout/generators/generator/generator_generator_rb.html +52 -0
- data/rdoc/lib/sprout/generators/generator/templates/generator_test_helper_rb.html +64 -0
- data/rdoc/lib/sprout/generators/library/library_generator_rb.html +52 -0
- data/rdoc/lib/sprout/generators/ruby/ruby_generator_rb.html +52 -0
- data/rdoc/lib/sprout/generators/ruby/templates/ruby_base_rb.html +54 -0
- data/rdoc/lib/sprout/generators/tool/tool_generator_rb.html +52 -0
- data/rdoc/lib/sprout/library_rb.html +52 -0
- data/rdoc/lib/sprout/log_rb.html +52 -0
- data/rdoc/lib/sprout/platform_rb.html +52 -0
- data/rdoc/lib/sprout/process_runner_rb.html +58 -0
- data/rdoc/lib/sprout/progress_bar_rb.html +72 -0
- data/rdoc/lib/sprout/rdoc_parser_rb.html +54 -0
- data/rdoc/lib/sprout/remote_file_loader_rb.html +54 -0
- data/rdoc/lib/sprout/remote_file_target_rb.html +52 -0
- data/rdoc/lib/sprout/ruby_feature_rb.html +52 -0
- data/rdoc/lib/sprout/specification_rb.html +52 -0
- data/rdoc/lib/sprout/string_rb.html +52 -0
- data/rdoc/lib/sprout/system/base_system_rb.html +52 -0
- data/rdoc/lib/sprout/system/java_system_rb.html +52 -0
- data/rdoc/lib/sprout/system/osx_system_rb.html +52 -0
- data/rdoc/lib/sprout/system/unix_system_rb.html +52 -0
- data/rdoc/lib/sprout/system/vista_system_rb.html +52 -0
- data/rdoc/lib/sprout/system/win_nix_system_rb.html +52 -0
- data/rdoc/lib/sprout/system/win_system_rb.html +52 -0
- data/rdoc/lib/sprout/system_rb.html +66 -0
- data/rdoc/lib/sprout/test/sprout_test_case_rb.html +57 -0
- data/rdoc/lib/sprout/version_rb.html +52 -0
- data/rdoc/lib/sprout_rb.html +54 -0
- data/rdoc/rdoc.css +706 -0
- data/test/fixtures/executable/mxmlc.rb +2 -2
- data/test/unit/executable_test.rb +13 -0
- data/test/unit/generator_test.rb +25 -2
- metadata +144 -3
data/lib/sprout/executable.rb
CHANGED
@@ -303,13 +303,15 @@ module Sprout
|
|
303
303
|
end
|
304
304
|
end
|
305
305
|
|
306
|
-
def to_rake args
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
file_task = file args do
|
306
|
+
def to_rake *args
|
307
|
+
# Define the file task for - so that
|
308
|
+
# desc blocks hook up to it...
|
309
|
+
file_task = file *args do
|
311
310
|
execute
|
312
311
|
end
|
312
|
+
update_rake_task_name_from_args *args
|
313
|
+
yield self if block_given?
|
314
|
+
prepare
|
313
315
|
file_task.prerequisites << task(Sprout::Library::TASK_NAME)
|
314
316
|
prerequisites.each do |prereq|
|
315
317
|
file_task.prerequisites << prereq
|
@@ -317,6 +319,31 @@ module Sprout
|
|
317
319
|
file_task
|
318
320
|
end
|
319
321
|
|
322
|
+
##
|
323
|
+
# This will create a hash of ONLY values that are created
|
324
|
+
# using +add_param+, properties that are created with
|
325
|
+
# attr_accessor must be handled manually, or patches are welcome!
|
326
|
+
def to_hash
|
327
|
+
result = {}
|
328
|
+
params.each do |param|
|
329
|
+
result[param.name] = self.send(param.name)
|
330
|
+
end
|
331
|
+
result
|
332
|
+
end
|
333
|
+
|
334
|
+
##
|
335
|
+
# This will ignore unknown parameters, because our very
|
336
|
+
# first use case, is when generators call other generators
|
337
|
+
# and generator A might have different parameters than
|
338
|
+
# generator B.
|
339
|
+
def from_hash hash
|
340
|
+
hash.each_pair do |key, value|
|
341
|
+
if(self.respond_to?(key))
|
342
|
+
self.send "#{key}=", value
|
343
|
+
end
|
344
|
+
end
|
345
|
+
end
|
346
|
+
|
320
347
|
def to_help
|
321
348
|
option_parser.to_s
|
322
349
|
end
|
@@ -345,13 +372,13 @@ module Sprout
|
|
345
372
|
|
346
373
|
protected
|
347
374
|
|
348
|
-
def update_rake_task_name_from_args args
|
349
|
-
self.rake_task_name =
|
375
|
+
def update_rake_task_name_from_args *args
|
376
|
+
self.rake_task_name = parse_rake_task_arg args.last
|
350
377
|
end
|
351
378
|
|
352
|
-
def
|
353
|
-
return
|
354
|
-
|
379
|
+
def parse_rake_task_arg arg
|
380
|
+
return arg if arg.is_a?(Symbol) || arg.is_a?(String)
|
381
|
+
arg.each_pair do |key, value|
|
355
382
|
return key
|
356
383
|
end
|
357
384
|
nil
|
@@ -10,6 +10,15 @@ module Sprout
|
|
10
10
|
super(generator_class)
|
11
11
|
end
|
12
12
|
|
13
|
+
def create_instance class_base_name, options=nil
|
14
|
+
registered_entities.each do |entity|
|
15
|
+
if(entity.to_s.match /#{class_base_name}$/)
|
16
|
+
return entity.new
|
17
|
+
end
|
18
|
+
end
|
19
|
+
raise Sprout::Errors::MissingGeneratorError.new "Could not find any generator named: (#{class_base_name}). Perhaps you need to add a RubyGem to your Gemfile?"
|
20
|
+
end
|
21
|
+
|
13
22
|
def template_folder_for clazz
|
14
23
|
# Search the potential matches in reverse order
|
15
24
|
# because subclasses have registered AFTER their
|
@@ -220,6 +229,14 @@ module Sprout
|
|
220
229
|
@command.template name, template
|
221
230
|
end
|
222
231
|
|
232
|
+
def generator name, options={}
|
233
|
+
class_name = "#{name.to_s.camel_case}Generator"
|
234
|
+
instance = Sprout::Generator.create_instance class_name, options
|
235
|
+
instance.from_hash to_hash.merge(options)
|
236
|
+
instance.logger = logger
|
237
|
+
instance.execute
|
238
|
+
end
|
239
|
+
|
223
240
|
private
|
224
241
|
|
225
242
|
def self.template_from_caller caller_string
|
data/lib/sprout/ruby_feature.rb
CHANGED
data/lib/sprout/version.rb
CHANGED
data/rdoc/<.html
ADDED
@@ -0,0 +1,274 @@
|
|
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: <</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/generators/ruby/templates/ruby_base_rb.html?TB_iframe=true&height=550&width=785"
|
42
|
+
class="thickbox" title="lib/sprout/generators/ruby/templates/ruby_base.rb">lib/sprout/generators/ruby/templates/ruby_base.rb</a></li>
|
43
|
+
|
44
|
+
</ul>
|
45
|
+
</div>
|
46
|
+
</div>
|
47
|
+
|
48
|
+
|
49
|
+
</div>
|
50
|
+
|
51
|
+
<div id="class-metadata">
|
52
|
+
|
53
|
+
<!-- Parent Class -->
|
54
|
+
|
55
|
+
|
56
|
+
<!-- Namespace Contents -->
|
57
|
+
|
58
|
+
|
59
|
+
<!-- Method Quickref -->
|
60
|
+
|
61
|
+
|
62
|
+
<!-- Included Modules -->
|
63
|
+
|
64
|
+
</div>
|
65
|
+
|
66
|
+
<div id="project-metadata">
|
67
|
+
|
68
|
+
|
69
|
+
|
70
|
+
<div id="classindex-section" class="section project-section">
|
71
|
+
<h3 class="section-header">Class Index
|
72
|
+
<span class="search-toggle"><img src="./images/find.png"
|
73
|
+
height="16" width="16" alt="[+]"
|
74
|
+
title="show/hide quicksearch" /></span></h3>
|
75
|
+
<form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
|
76
|
+
<fieldset>
|
77
|
+
<legend>Quicksearch</legend>
|
78
|
+
<input type="text" name="quicksearch" value=""
|
79
|
+
class="quicksearch-field" />
|
80
|
+
</fieldset>
|
81
|
+
</form>
|
82
|
+
|
83
|
+
<ul class="link-list">
|
84
|
+
|
85
|
+
<li><a href="./Sprout/ArchiveUnpacker.html">Sprout::ArchiveUnpacker</a></li>
|
86
|
+
|
87
|
+
<li><a href="./Sprout/Base.html">Sprout::Base</a></li>
|
88
|
+
|
89
|
+
<li><a href="./Sprout/Base/ClassMethods.html">Sprout::Base::ClassMethods</a></li>
|
90
|
+
|
91
|
+
<li><a href="./Sprout/Concern.html">Sprout::Concern</a></li>
|
92
|
+
|
93
|
+
<li><a href="./Sprout/Errors.html">Sprout::Errors</a></li>
|
94
|
+
|
95
|
+
<li><a href="./Sprout/Errors/ArchiveUnpackerError.html">Sprout::Errors::ArchiveUnpackerError</a></li>
|
96
|
+
|
97
|
+
<li><a href="./Sprout/Errors/DestinationExistsError.html">Sprout::Errors::DestinationExistsError</a></li>
|
98
|
+
|
99
|
+
<li><a href="./Sprout/Errors/DuplicateMemberError.html">Sprout::Errors::DuplicateMemberError</a></li>
|
100
|
+
|
101
|
+
<li><a href="./Sprout/Errors/ExecutableError.html">Sprout::Errors::ExecutableError</a></li>
|
102
|
+
|
103
|
+
<li><a href="./Sprout/Errors/ExecutableRegistrationError.html">Sprout::Errors::ExecutableRegistrationError</a></li>
|
104
|
+
|
105
|
+
<li><a href="./Sprout/Errors/ExecutionError.html">Sprout::Errors::ExecutionError</a></li>
|
106
|
+
|
107
|
+
<li><a href="./Sprout/Errors/GeneratorError.html">Sprout::Errors::GeneratorError</a></li>
|
108
|
+
|
109
|
+
<li><a href="./Sprout/Errors/InvalidArgumentError.html">Sprout::Errors::InvalidArgumentError</a></li>
|
110
|
+
|
111
|
+
<li><a href="./Sprout/Errors/LoadError.html">Sprout::Errors::LoadError</a></li>
|
112
|
+
|
113
|
+
<li><a href="./Sprout/Errors/MissingArgumentError.html">Sprout::Errors::MissingArgumentError</a></li>
|
114
|
+
|
115
|
+
<li><a href="./Sprout/Errors/MissingExecutableError.html">Sprout::Errors::MissingExecutableError</a></li>
|
116
|
+
|
117
|
+
<li><a href="./Sprout/Errors/MissingGeneratorError.html">Sprout::Errors::MissingGeneratorError</a></li>
|
118
|
+
|
119
|
+
<li><a href="./Sprout/Errors/MissingTemplateError.html">Sprout::Errors::MissingTemplateError</a></li>
|
120
|
+
|
121
|
+
<li><a href="./Sprout/Errors/ProcessRunnerError.html">Sprout::Errors::ProcessRunnerError</a></li>
|
122
|
+
|
123
|
+
<li><a href="./Sprout/Errors/RemoteFileLoaderError.html">Sprout::Errors::RemoteFileLoaderError</a></li>
|
124
|
+
|
125
|
+
<li><a href="./Sprout/Errors/SproutError.html">Sprout::Errors::SproutError</a></li>
|
126
|
+
|
127
|
+
<li><a href="./Sprout/Errors/UnknownArchiveType.html">Sprout::Errors::UnknownArchiveType</a></li>
|
128
|
+
|
129
|
+
<li><a href="./Sprout/Errors/UsageError.html">Sprout::Errors::UsageError</a></li>
|
130
|
+
|
131
|
+
<li><a href="./Sprout/Errors/ValidationError.html">Sprout::Errors::ValidationError</a></li>
|
132
|
+
|
133
|
+
<li><a href="./Sprout/Errors/VersionRequirementNotMetError.html">Sprout::Errors::VersionRequirementNotMetError</a></li>
|
134
|
+
|
135
|
+
<li><a href="./Sprout/Executable.html">Sprout::Executable</a></li>
|
136
|
+
|
137
|
+
<li><a href="./Sprout/Executable/Boolean.html">Sprout::Executable::Boolean</a></li>
|
138
|
+
|
139
|
+
<li><a href="./Sprout/Executable/ClassMethods.html">Sprout::Executable::ClassMethods</a></li>
|
140
|
+
|
141
|
+
<li><a href="./Sprout/Executable/CollectionParam.html">Sprout::Executable::CollectionParam</a></li>
|
142
|
+
|
143
|
+
<li><a href="./Sprout/Executable/FileParam.html">Sprout::Executable::FileParam</a></li>
|
144
|
+
|
145
|
+
<li><a href="./Sprout/Executable/Files.html">Sprout::Executable::Files</a></li>
|
146
|
+
|
147
|
+
<li><a href="./Sprout/Executable/InstanceMethods.html">Sprout::Executable::InstanceMethods</a></li>
|
148
|
+
|
149
|
+
<li><a href="./Sprout/Executable/Number.html">Sprout::Executable::Number</a></li>
|
150
|
+
|
151
|
+
<li><a href="./Sprout/Executable/Param.html">Sprout::Executable::Param</a></li>
|
152
|
+
|
153
|
+
<li><a href="./Sprout/Executable/ParameterFactory.html">Sprout::Executable::ParameterFactory</a></li>
|
154
|
+
|
155
|
+
<li><a href="./Sprout/Executable/Path.html">Sprout::Executable::Path</a></li>
|
156
|
+
|
157
|
+
<li><a href="./Sprout/Executable/Paths.html">Sprout::Executable::Paths</a></li>
|
158
|
+
|
159
|
+
<li><a href="./Sprout/Executable/StringParam.html">Sprout::Executable::StringParam</a></li>
|
160
|
+
|
161
|
+
<li><a href="./Sprout/Executable/Strings.html">Sprout::Executable::Strings</a></li>
|
162
|
+
|
163
|
+
<li><a href="./Sprout/Executable/Url.html">Sprout::Executable::Url</a></li>
|
164
|
+
|
165
|
+
<li><a href="./Sprout/Executable/Urls.html">Sprout::Executable::Urls</a></li>
|
166
|
+
|
167
|
+
<li><a href="./Sprout/FileTarget.html">Sprout::FileTarget</a></li>
|
168
|
+
|
169
|
+
<li><a href="./Sprout/Generator.html">Sprout::Generator</a></li>
|
170
|
+
|
171
|
+
<li><a href="./Sprout/Generator/Base.html">Sprout::Generator::Base</a></li>
|
172
|
+
|
173
|
+
<li><a href="./Sprout/Generator/Command.html">Sprout::Generator::Command</a></li>
|
174
|
+
|
175
|
+
<li><a href="./Sprout/Generator/DirectoryManifest.html">Sprout::Generator::DirectoryManifest</a></li>
|
176
|
+
|
177
|
+
<li><a href="./Sprout/Generator/FileManifest.html">Sprout::Generator::FileManifest</a></li>
|
178
|
+
|
179
|
+
<li><a href="./Sprout/Generator/Manifest.html">Sprout::Generator::Manifest</a></li>
|
180
|
+
|
181
|
+
<li><a href="./Sprout/Generator/TemplateManifest.html">Sprout::Generator::TemplateManifest</a></li>
|
182
|
+
|
183
|
+
<li><a href="./Sprout/GeneratorGenerator.html">Sprout::GeneratorGenerator</a></li>
|
184
|
+
|
185
|
+
<li><a href="./Sprout/Library.html">Sprout::Library</a></li>
|
186
|
+
|
187
|
+
<li><a href="./Sprout/LibraryGenerator.html">Sprout::LibraryGenerator</a></li>
|
188
|
+
|
189
|
+
<li><a href="./Sprout/Platform.html">Sprout::Platform</a></li>
|
190
|
+
|
191
|
+
<li><a href="./Sprout/ProcessRunner.html">Sprout::ProcessRunner</a></li>
|
192
|
+
|
193
|
+
<li><a href="./Sprout/RDocParser.html">Sprout::RDocParser</a></li>
|
194
|
+
|
195
|
+
<li><a href="./Sprout/RemoteFileLoader.html">Sprout::RemoteFileLoader</a></li>
|
196
|
+
|
197
|
+
<li><a href="./Sprout/RemoteFileTarget.html">Sprout::RemoteFileTarget</a></li>
|
198
|
+
|
199
|
+
<li><a href="./Sprout/RubyFeature.html">Sprout::RubyFeature</a></li>
|
200
|
+
|
201
|
+
<li><a href="./Sprout/RubyFeature/ClassMethods.html">Sprout::RubyFeature::ClassMethods</a></li>
|
202
|
+
|
203
|
+
<li><a href="./Sprout/RubyGenerator.html">Sprout::RubyGenerator</a></li>
|
204
|
+
|
205
|
+
<li><a href="./Sprout/Specification.html">Sprout::Specification</a></li>
|
206
|
+
|
207
|
+
<li><a href="./Sprout/System.html">Sprout::System</a></li>
|
208
|
+
|
209
|
+
<li><a href="./Sprout/System/BaseSystem.html">Sprout::System::BaseSystem</a></li>
|
210
|
+
|
211
|
+
<li><a href="./Sprout/System/JavaSystem.html">Sprout::System::JavaSystem</a></li>
|
212
|
+
|
213
|
+
<li><a href="./Sprout/System/OSXSystem.html">Sprout::System::OSXSystem</a></li>
|
214
|
+
|
215
|
+
<li><a href="./Sprout/System/UnixSystem.html">Sprout::System::UnixSystem</a></li>
|
216
|
+
|
217
|
+
<li><a href="./Sprout/System/VistaSystem.html">Sprout::System::VistaSystem</a></li>
|
218
|
+
|
219
|
+
<li><a href="./Sprout/System/WinNixSystem.html">Sprout::System::WinNixSystem</a></li>
|
220
|
+
|
221
|
+
<li><a href="./Sprout/System/WinSystem.html">Sprout::System::WinSystem</a></li>
|
222
|
+
|
223
|
+
<li><a href="./Sprout/ToolGenerator.html">Sprout::ToolGenerator</a></li>
|
224
|
+
|
225
|
+
<li><a href="./<.html"><</a></li>
|
226
|
+
|
227
|
+
<li><a href="./Dir.html">Dir</a></li>
|
228
|
+
|
229
|
+
<li><a href="./Object.html">Object</a></li>
|
230
|
+
|
231
|
+
<li><a href="./String.html">String</a></li>
|
232
|
+
|
233
|
+
</ul>
|
234
|
+
<div id="no-class-search-results" style="display: none;">No matching classes.</div>
|
235
|
+
</div>
|
236
|
+
|
237
|
+
|
238
|
+
</div>
|
239
|
+
</div>
|
240
|
+
|
241
|
+
<div id="documentation">
|
242
|
+
<h1 class="module"><</h1>
|
243
|
+
|
244
|
+
<div id="description">
|
245
|
+
|
246
|
+
</div>
|
247
|
+
|
248
|
+
<!-- Constants -->
|
249
|
+
|
250
|
+
|
251
|
+
<!-- Attributes -->
|
252
|
+
|
253
|
+
|
254
|
+
<!-- Methods -->
|
255
|
+
|
256
|
+
|
257
|
+
</div>
|
258
|
+
|
259
|
+
|
260
|
+
<div id="rdoc-debugging-section-dump" class="debugging-section">
|
261
|
+
|
262
|
+
<p>Disabled; run with --debug to generate this.</p>
|
263
|
+
|
264
|
+
</div>
|
265
|
+
|
266
|
+
<div id="validator-badges">
|
267
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
268
|
+
<p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
|
269
|
+
Rdoc Generator</a> 1.1.6</small>.</p>
|
270
|
+
</div>
|
271
|
+
|
272
|
+
</body>
|
273
|
+
</html>
|
274
|
+
|
data/rdoc/Dir.html
ADDED
@@ -0,0 +1,387 @@
|
|
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>Class: Dir</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="class">
|
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/dir_rb.html?TB_iframe=true&height=550&width=785"
|
42
|
+
class="thickbox" title="lib/sprout/dir.rb">lib/sprout/dir.rb</a></li>
|
43
|
+
|
44
|
+
</ul>
|
45
|
+
</div>
|
46
|
+
</div>
|
47
|
+
|
48
|
+
|
49
|
+
</div>
|
50
|
+
|
51
|
+
<div id="class-metadata">
|
52
|
+
|
53
|
+
<!-- Parent Class -->
|
54
|
+
|
55
|
+
<div id="parent-class-section" class="section">
|
56
|
+
<h3 class="section-header">Parent</h3>
|
57
|
+
|
58
|
+
<p class="link"><a href="Object.html">Object</a></p>
|
59
|
+
|
60
|
+
</div>
|
61
|
+
|
62
|
+
|
63
|
+
<!-- Namespace Contents -->
|
64
|
+
|
65
|
+
|
66
|
+
<!-- Method Quickref -->
|
67
|
+
|
68
|
+
<div id="method-list-section" class="section">
|
69
|
+
<h3 class="section-header">Methods</h3>
|
70
|
+
<ul class="link-list">
|
71
|
+
|
72
|
+
<li><a href="#method-c-empty%3F">::empty?</a></li>
|
73
|
+
|
74
|
+
<li><a href="#method-i-empty%3F">#empty?</a></li>
|
75
|
+
|
76
|
+
</ul>
|
77
|
+
</div>
|
78
|
+
|
79
|
+
|
80
|
+
<!-- Included Modules -->
|
81
|
+
|
82
|
+
</div>
|
83
|
+
|
84
|
+
<div id="project-metadata">
|
85
|
+
|
86
|
+
|
87
|
+
|
88
|
+
<div id="classindex-section" class="section project-section">
|
89
|
+
<h3 class="section-header">Class Index
|
90
|
+
<span class="search-toggle"><img src="./images/find.png"
|
91
|
+
height="16" width="16" alt="[+]"
|
92
|
+
title="show/hide quicksearch" /></span></h3>
|
93
|
+
<form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
|
94
|
+
<fieldset>
|
95
|
+
<legend>Quicksearch</legend>
|
96
|
+
<input type="text" name="quicksearch" value=""
|
97
|
+
class="quicksearch-field" />
|
98
|
+
</fieldset>
|
99
|
+
</form>
|
100
|
+
|
101
|
+
<ul class="link-list">
|
102
|
+
|
103
|
+
<li><a href="./Sprout/ArchiveUnpacker.html">Sprout::ArchiveUnpacker</a></li>
|
104
|
+
|
105
|
+
<li><a href="./Sprout/Base.html">Sprout::Base</a></li>
|
106
|
+
|
107
|
+
<li><a href="./Sprout/Base/ClassMethods.html">Sprout::Base::ClassMethods</a></li>
|
108
|
+
|
109
|
+
<li><a href="./Sprout/Concern.html">Sprout::Concern</a></li>
|
110
|
+
|
111
|
+
<li><a href="./Sprout/Errors.html">Sprout::Errors</a></li>
|
112
|
+
|
113
|
+
<li><a href="./Sprout/Errors/ArchiveUnpackerError.html">Sprout::Errors::ArchiveUnpackerError</a></li>
|
114
|
+
|
115
|
+
<li><a href="./Sprout/Errors/DestinationExistsError.html">Sprout::Errors::DestinationExistsError</a></li>
|
116
|
+
|
117
|
+
<li><a href="./Sprout/Errors/DuplicateMemberError.html">Sprout::Errors::DuplicateMemberError</a></li>
|
118
|
+
|
119
|
+
<li><a href="./Sprout/Errors/ExecutableError.html">Sprout::Errors::ExecutableError</a></li>
|
120
|
+
|
121
|
+
<li><a href="./Sprout/Errors/ExecutableRegistrationError.html">Sprout::Errors::ExecutableRegistrationError</a></li>
|
122
|
+
|
123
|
+
<li><a href="./Sprout/Errors/ExecutionError.html">Sprout::Errors::ExecutionError</a></li>
|
124
|
+
|
125
|
+
<li><a href="./Sprout/Errors/GeneratorError.html">Sprout::Errors::GeneratorError</a></li>
|
126
|
+
|
127
|
+
<li><a href="./Sprout/Errors/InvalidArgumentError.html">Sprout::Errors::InvalidArgumentError</a></li>
|
128
|
+
|
129
|
+
<li><a href="./Sprout/Errors/LoadError.html">Sprout::Errors::LoadError</a></li>
|
130
|
+
|
131
|
+
<li><a href="./Sprout/Errors/MissingArgumentError.html">Sprout::Errors::MissingArgumentError</a></li>
|
132
|
+
|
133
|
+
<li><a href="./Sprout/Errors/MissingExecutableError.html">Sprout::Errors::MissingExecutableError</a></li>
|
134
|
+
|
135
|
+
<li><a href="./Sprout/Errors/MissingGeneratorError.html">Sprout::Errors::MissingGeneratorError</a></li>
|
136
|
+
|
137
|
+
<li><a href="./Sprout/Errors/MissingTemplateError.html">Sprout::Errors::MissingTemplateError</a></li>
|
138
|
+
|
139
|
+
<li><a href="./Sprout/Errors/ProcessRunnerError.html">Sprout::Errors::ProcessRunnerError</a></li>
|
140
|
+
|
141
|
+
<li><a href="./Sprout/Errors/RemoteFileLoaderError.html">Sprout::Errors::RemoteFileLoaderError</a></li>
|
142
|
+
|
143
|
+
<li><a href="./Sprout/Errors/SproutError.html">Sprout::Errors::SproutError</a></li>
|
144
|
+
|
145
|
+
<li><a href="./Sprout/Errors/UnknownArchiveType.html">Sprout::Errors::UnknownArchiveType</a></li>
|
146
|
+
|
147
|
+
<li><a href="./Sprout/Errors/UsageError.html">Sprout::Errors::UsageError</a></li>
|
148
|
+
|
149
|
+
<li><a href="./Sprout/Errors/ValidationError.html">Sprout::Errors::ValidationError</a></li>
|
150
|
+
|
151
|
+
<li><a href="./Sprout/Errors/VersionRequirementNotMetError.html">Sprout::Errors::VersionRequirementNotMetError</a></li>
|
152
|
+
|
153
|
+
<li><a href="./Sprout/Executable.html">Sprout::Executable</a></li>
|
154
|
+
|
155
|
+
<li><a href="./Sprout/Executable/Boolean.html">Sprout::Executable::Boolean</a></li>
|
156
|
+
|
157
|
+
<li><a href="./Sprout/Executable/ClassMethods.html">Sprout::Executable::ClassMethods</a></li>
|
158
|
+
|
159
|
+
<li><a href="./Sprout/Executable/CollectionParam.html">Sprout::Executable::CollectionParam</a></li>
|
160
|
+
|
161
|
+
<li><a href="./Sprout/Executable/FileParam.html">Sprout::Executable::FileParam</a></li>
|
162
|
+
|
163
|
+
<li><a href="./Sprout/Executable/Files.html">Sprout::Executable::Files</a></li>
|
164
|
+
|
165
|
+
<li><a href="./Sprout/Executable/InstanceMethods.html">Sprout::Executable::InstanceMethods</a></li>
|
166
|
+
|
167
|
+
<li><a href="./Sprout/Executable/Number.html">Sprout::Executable::Number</a></li>
|
168
|
+
|
169
|
+
<li><a href="./Sprout/Executable/Param.html">Sprout::Executable::Param</a></li>
|
170
|
+
|
171
|
+
<li><a href="./Sprout/Executable/ParameterFactory.html">Sprout::Executable::ParameterFactory</a></li>
|
172
|
+
|
173
|
+
<li><a href="./Sprout/Executable/Path.html">Sprout::Executable::Path</a></li>
|
174
|
+
|
175
|
+
<li><a href="./Sprout/Executable/Paths.html">Sprout::Executable::Paths</a></li>
|
176
|
+
|
177
|
+
<li><a href="./Sprout/Executable/StringParam.html">Sprout::Executable::StringParam</a></li>
|
178
|
+
|
179
|
+
<li><a href="./Sprout/Executable/Strings.html">Sprout::Executable::Strings</a></li>
|
180
|
+
|
181
|
+
<li><a href="./Sprout/Executable/Url.html">Sprout::Executable::Url</a></li>
|
182
|
+
|
183
|
+
<li><a href="./Sprout/Executable/Urls.html">Sprout::Executable::Urls</a></li>
|
184
|
+
|
185
|
+
<li><a href="./Sprout/FileTarget.html">Sprout::FileTarget</a></li>
|
186
|
+
|
187
|
+
<li><a href="./Sprout/Generator.html">Sprout::Generator</a></li>
|
188
|
+
|
189
|
+
<li><a href="./Sprout/Generator/Base.html">Sprout::Generator::Base</a></li>
|
190
|
+
|
191
|
+
<li><a href="./Sprout/Generator/Command.html">Sprout::Generator::Command</a></li>
|
192
|
+
|
193
|
+
<li><a href="./Sprout/Generator/DirectoryManifest.html">Sprout::Generator::DirectoryManifest</a></li>
|
194
|
+
|
195
|
+
<li><a href="./Sprout/Generator/FileManifest.html">Sprout::Generator::FileManifest</a></li>
|
196
|
+
|
197
|
+
<li><a href="./Sprout/Generator/Manifest.html">Sprout::Generator::Manifest</a></li>
|
198
|
+
|
199
|
+
<li><a href="./Sprout/Generator/TemplateManifest.html">Sprout::Generator::TemplateManifest</a></li>
|
200
|
+
|
201
|
+
<li><a href="./Sprout/GeneratorGenerator.html">Sprout::GeneratorGenerator</a></li>
|
202
|
+
|
203
|
+
<li><a href="./Sprout/Library.html">Sprout::Library</a></li>
|
204
|
+
|
205
|
+
<li><a href="./Sprout/LibraryGenerator.html">Sprout::LibraryGenerator</a></li>
|
206
|
+
|
207
|
+
<li><a href="./Sprout/Platform.html">Sprout::Platform</a></li>
|
208
|
+
|
209
|
+
<li><a href="./Sprout/ProcessRunner.html">Sprout::ProcessRunner</a></li>
|
210
|
+
|
211
|
+
<li><a href="./Sprout/RDocParser.html">Sprout::RDocParser</a></li>
|
212
|
+
|
213
|
+
<li><a href="./Sprout/RemoteFileLoader.html">Sprout::RemoteFileLoader</a></li>
|
214
|
+
|
215
|
+
<li><a href="./Sprout/RemoteFileTarget.html">Sprout::RemoteFileTarget</a></li>
|
216
|
+
|
217
|
+
<li><a href="./Sprout/RubyFeature.html">Sprout::RubyFeature</a></li>
|
218
|
+
|
219
|
+
<li><a href="./Sprout/RubyFeature/ClassMethods.html">Sprout::RubyFeature::ClassMethods</a></li>
|
220
|
+
|
221
|
+
<li><a href="./Sprout/RubyGenerator.html">Sprout::RubyGenerator</a></li>
|
222
|
+
|
223
|
+
<li><a href="./Sprout/Specification.html">Sprout::Specification</a></li>
|
224
|
+
|
225
|
+
<li><a href="./Sprout/System.html">Sprout::System</a></li>
|
226
|
+
|
227
|
+
<li><a href="./Sprout/System/BaseSystem.html">Sprout::System::BaseSystem</a></li>
|
228
|
+
|
229
|
+
<li><a href="./Sprout/System/JavaSystem.html">Sprout::System::JavaSystem</a></li>
|
230
|
+
|
231
|
+
<li><a href="./Sprout/System/OSXSystem.html">Sprout::System::OSXSystem</a></li>
|
232
|
+
|
233
|
+
<li><a href="./Sprout/System/UnixSystem.html">Sprout::System::UnixSystem</a></li>
|
234
|
+
|
235
|
+
<li><a href="./Sprout/System/VistaSystem.html">Sprout::System::VistaSystem</a></li>
|
236
|
+
|
237
|
+
<li><a href="./Sprout/System/WinNixSystem.html">Sprout::System::WinNixSystem</a></li>
|
238
|
+
|
239
|
+
<li><a href="./Sprout/System/WinSystem.html">Sprout::System::WinSystem</a></li>
|
240
|
+
|
241
|
+
<li><a href="./Sprout/ToolGenerator.html">Sprout::ToolGenerator</a></li>
|
242
|
+
|
243
|
+
<li><a href="./<.html"><</a></li>
|
244
|
+
|
245
|
+
<li><a href="./Dir.html">Dir</a></li>
|
246
|
+
|
247
|
+
<li><a href="./Object.html">Object</a></li>
|
248
|
+
|
249
|
+
<li><a href="./String.html">String</a></li>
|
250
|
+
|
251
|
+
</ul>
|
252
|
+
<div id="no-class-search-results" style="display: none;">No matching classes.</div>
|
253
|
+
</div>
|
254
|
+
|
255
|
+
|
256
|
+
</div>
|
257
|
+
</div>
|
258
|
+
|
259
|
+
<div id="documentation">
|
260
|
+
<h1 class="class">Dir</h1>
|
261
|
+
|
262
|
+
<div id="description">
|
263
|
+
|
264
|
+
</div>
|
265
|
+
|
266
|
+
<!-- Constants -->
|
267
|
+
|
268
|
+
|
269
|
+
<!-- Attributes -->
|
270
|
+
|
271
|
+
|
272
|
+
<!-- Methods -->
|
273
|
+
|
274
|
+
<div id="public-class-method-details" class="method-section section">
|
275
|
+
<h3 class="section-header">Public Class Methods</h3>
|
276
|
+
|
277
|
+
|
278
|
+
<div id="empty--method" class="method-detail ">
|
279
|
+
<a name="method-c-empty%3F"></a>
|
280
|
+
|
281
|
+
<div class="method-heading">
|
282
|
+
|
283
|
+
<span class="method-name">empty?</span><span
|
284
|
+
class="method-args">(path)</span>
|
285
|
+
<span class="method-click-advice">click to toggle source</span>
|
286
|
+
|
287
|
+
</div>
|
288
|
+
|
289
|
+
<div class="method-description">
|
290
|
+
|
291
|
+
<p>
|
292
|
+
Return true if the provided path has no children.
|
293
|
+
</p>
|
294
|
+
<p>
|
295
|
+
Code found here: <a
|
296
|
+
href="http://www.ruby-forum.com/topic/84762">www.ruby-forum.com/topic/84762</a>
|
297
|
+
</p>
|
298
|
+
|
299
|
+
|
300
|
+
|
301
|
+
<div class="method-source-code"
|
302
|
+
id="empty--source">
|
303
|
+
<pre>
|
304
|
+
<span class="ruby-comment cmt"># File lib/sprout/dir.rb, line 19</span>
|
305
|
+
19: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">empty?</span> <span class="ruby-identifier">path</span>
|
306
|
+
20: <span class="ruby-identifier">new</span>(<span class="ruby-identifier">path</span>).<span class="ruby-identifier">empty?</span>
|
307
|
+
21: <span class="ruby-keyword kw">end</span></pre>
|
308
|
+
</div>
|
309
|
+
|
310
|
+
</div>
|
311
|
+
|
312
|
+
|
313
|
+
|
314
|
+
|
315
|
+
</div>
|
316
|
+
|
317
|
+
|
318
|
+
</div>
|
319
|
+
|
320
|
+
<div id="public-instance-method-details" class="method-section section">
|
321
|
+
<h3 class="section-header">Public Instance Methods</h3>
|
322
|
+
|
323
|
+
|
324
|
+
<div id="empty--method" class="method-detail ">
|
325
|
+
<a name="method-i-empty%3F"></a>
|
326
|
+
|
327
|
+
<div class="method-heading">
|
328
|
+
|
329
|
+
<span class="method-name">empty?</span><span
|
330
|
+
class="method-args">()</span>
|
331
|
+
<span class="method-click-advice">click to toggle source</span>
|
332
|
+
|
333
|
+
</div>
|
334
|
+
|
335
|
+
<div class="method-description">
|
336
|
+
|
337
|
+
<p>
|
338
|
+
Return true if the directory has no children.
|
339
|
+
</p>
|
340
|
+
<p>
|
341
|
+
Code found here: <a
|
342
|
+
href="http://www.ruby-forum.com/topic/84762">www.ruby-forum.com/topic/84762</a>
|
343
|
+
</p>
|
344
|
+
|
345
|
+
|
346
|
+
|
347
|
+
<div class="method-source-code"
|
348
|
+
id="empty--source">
|
349
|
+
<pre>
|
350
|
+
<span class="ruby-comment cmt"># File lib/sprout/dir.rb, line 8</span>
|
351
|
+
8: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">empty?</span>
|
352
|
+
9: <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">glob</span>(<span class="ruby-node">"#{ path }/*"</span>, <span class="ruby-constant">File</span><span class="ruby-operator">::</span><span class="ruby-constant">FNM_DOTMATCH</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">e</span><span class="ruby-operator">|</span>
|
353
|
+
10: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-node">%( . .. )</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-constant">File</span><span class="ruby-operator">::</span><span class="ruby-identifier">basename</span>(<span class="ruby-identifier">e</span>))
|
354
|
+
11: <span class="ruby-keyword kw">end</span>
|
355
|
+
12: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span>
|
356
|
+
13: <span class="ruby-keyword kw">end</span></pre>
|
357
|
+
</div>
|
358
|
+
|
359
|
+
</div>
|
360
|
+
|
361
|
+
|
362
|
+
|
363
|
+
|
364
|
+
</div>
|
365
|
+
|
366
|
+
|
367
|
+
</div>
|
368
|
+
|
369
|
+
|
370
|
+
</div>
|
371
|
+
|
372
|
+
|
373
|
+
<div id="rdoc-debugging-section-dump" class="debugging-section">
|
374
|
+
|
375
|
+
<p>Disabled; run with --debug to generate this.</p>
|
376
|
+
|
377
|
+
</div>
|
378
|
+
|
379
|
+
<div id="validator-badges">
|
380
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
381
|
+
<p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
|
382
|
+
Rdoc Generator</a> 1.1.6</small>.</p>
|
383
|
+
</div>
|
384
|
+
|
385
|
+
</body>
|
386
|
+
</html>
|
387
|
+
|