Class: Rake::FileCreationTask
- Defined in:
- lib/rake/file_creation_task.rb
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
#actions, #application, #locations, #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_description, #all_prerequisite_tasks, #arg_description, #arg_names, #clear, clear, #clear_actions, #clear_comments, #clear_prerequisites, #comment, #comment=, create_rule, define_task, #enhance, #execute, #full_comment, #initialize, #inspect, #investigation, #invoke, #invoke_prerequisites, #invoke_prerequisites_concurrently, #name, #name_with_args, #prerequisite_tasks, #reenable, scope_name, #set_arg_names, #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.
13 14 15 |
# File 'lib/rake/file_creation_task.rb', line 13 def needed? ! File.exist?(name) end |