Class: Rake::FileCreationTask
Overview
A FileCreationTask is a file task that when used as a dependency will be needed if and only if the file has not been created. Once created, it is not re-triggered if any of its dependencies are newer, nor does trigger any rebuilds of tasks that depend on it whenever it is updated.
Constant Summary
Constants inherited from Task
Instance Attribute Summary
Attributes inherited from Task
#comment, #prerequisites, #sources
Instance Method Summary collapse
-
#needed? ⇒ Boolean
Is this file task needed? Yes if it doesn’t exist.
-
#timestamp ⇒ Object
Time stamp for file creation task.
Methods inherited from Task
[], #add_comment, clear, create_rule, define_task, #enhance, enhance_with_matching_rule, #execute, #initialize, #investigation, #invoke, lookup, #name, #source, task_defined?, tasks
Constructor Details
This class inherits a constructor from Rake::Task
Instance Method Details
#needed? ⇒ Boolean
Is this file task needed? Yes if it doesn’t exist.
430 431 432 |
# File 'lib/rake.rb', line 430 def needed? ! File.exist?(name) end |