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.
Instance Attribute Summary
Attributes inherited from Task
#application, #comment, #prerequisites, #scope, #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 FileTask
Methods inherited from Task
[], #add_comment, clear, create_rule, define_task, #enhance, #execute, #initialize, #investigation, #invoke, #invoke_prerequisites, #name, scope_name, #source, task_defined?, tasks, #to_s
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.
540 541 542 |
# File 'lib/rake.rb', line 540 def needed? ! File.exist?(name) end |