Class: Rake::FileCreationTask

Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
self, FileTask, Task
Instance Chain:
self, FileTask, Task
Inherits: Rake::FileTask
Defined in: lib/rake/file_creation_task.rb


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.

Class Method Summary

FileTask - Inherited


Apply the scope to the task name according to the rules for this kind of task.

Task - Inherited


Return a task with the given name.


Clear the task list.


Define a rule for synthesizing tasks.


Define a task given args and an option block.


Format dependencies parameter to pass to task.


Create a task named task_name with no actions or prerequisites.


Apply the scope to the task name according to the rules for this kind of task.


TRUE if the task name is already defined.


List of all defined tasks.

Instance Attribute Summary

FileTask - Inherited


Is this file task needed? Yes if it doesn't exist, or if its time stamp is out of date.

Task - Inherited


List of actions attached to a task.


Has this task already been invoked? Already invoked tasks will be skipped unless you reenable them.


Application owning this task.


First line (or sentence) of all comments.


File/Line locations of each of the task definitions for this task (only valid if the task was defined with the detect location option set).


Is this task needed?


List of order only prerequisites for a task.


List of prerequisites for a task.


Array of nested namespaces names used for task lookup by this task.


List of sources for task.


Instance Method Summary

FileTask - Inherited


Time stamp for file task.


Are there any prerequisites with a later time than the given time stamp?

Task - Inherited


Add a description to the task.


List of all unique prerequisite tasks including prerequisite tasks' prerequisites.


Name of arguments for this task.


Clear the existing prerequisites, actions, comments, and arguments of a rake task.


Clear the existing actions on a rake task.


Clear the existing arguments on a rake task.


Clear the existing comments on a rake task.


Clear the existing prerequisites of a rake task.


Enhance a task with prerequisites or actions.


Execute the actions associated with this task.


Full collection of comments.


Return a string describing the internal state of a task.


Invoke the task if it is needed.


Name of the task, including any namespace qualifiers.


List of prerequisite tasks.


Reenable the task, allowing its tasks to be executed if the task is invoked again.


Set the names of the arguments for this task.


First source from a rule (nil if no sources).


Timestamp for this task.


Return task name.


Add order only dependencies.


Same as invoke, but explicitly pass a call chain to detect circular dependencies.


Get the first sentence in a string.


Format the trace flags for display.


Transform the list of comments as specified by the block and join with the separator.


Argument description (nil if none).


Invoke all the prerequisites of a task.


Invoke all the prerequisites of a task in parallel.


Name of task with argument list description.

#collect_prerequisites, #add_chain_to, #add_comment, #lookup_prerequisite

Constructor Details

This class inherits a constructor from Rake::Task

Instance Attribute Details

#needed?Boolean (readonly)

Is this file task needed? Yes if it doesn't exist.

[ GitHub ]

# File 'lib/rake/file_creation_task.rb', line 14

def needed?

Instance Method Details


Time stamp for file creation task. This time stamp is earlier than any other time stamp.

[ GitHub ]

# File 'lib/rake/file_creation_task.rb', line 20

def timestamp