Class: Rake::FileCreationTask
Relationships & Source Files | |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
|
|
Instance Chain:
|
|
Inherits: |
Rake::FileTask
|
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.
Class Method Summary
FileTask - Inherited
.scope_name | 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 | Clear the task list. |
.create_rule | Define a rule for synthesizing tasks. |
.define_task | Define a task given |
.new | Create a task named |
.scope_name | Apply the scope to the task name according to the rules for this kind of task. |
.task_defined? | TRUE if the task name is already defined. |
.tasks | List of all defined tasks. |
Instance Attribute Summary
-
#needed? ⇒ Boolean
readonly
Is this file task needed? Yes if it doesn't exist.
FileTask - Inherited
#needed? | Is this file task needed? Yes if it doesn't exist, or if its time stamp is out of date. |
Task - Inherited
#application | Application owning this task. |
#comment | First line (or sentence) of all comments. |
#sources, | |
#sources= | List of sources for task. |
#actions | List of actions attached to a task. |
#locations | 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). |
#needed? | Is this task needed? |
#prerequisites | List of prerequisites for a task. |
#scope | Array of nested namespaces names used for task lookup by this task. |
Instance Method Summary
-
#timestamp
::Time stamp for file creation task.
FileTask - Inherited
#timestamp | ::Time stamp for file task. |
#out_of_date? | Are there any prerequisites with a later time than the given time stamp? |
Task - Inherited
#add_description | Add a description to the task. |
#all_prerequisite_tasks | List of all unique prerequisite tasks including prerequisite tasks' prerequisites. |
#arg_names | Name of arguments for this task. |
#clear | Clear the existing prerequisites and actions of a rake task. |
#clear_actions | Clear the existing actions on a rake task. |
#clear_comments | Clear the existing comments on a rake task. |
#clear_prerequisites | Clear the existing prerequisites of a rake task. |
#enhance | Enhance a task with prerequisites or actions. |
#execute | Execute the actions associated with this task. |
#full_comment | Full collection of comments. |
#investigation | Return a string describing the internal state of a task. |
#invoke | Invoke the task if it is needed. |
#name | Name of the task, including any namespace qualifiers. |
#prerequisite_tasks | List of prerequisite tasks. |
#reenable | Reenable the task, allowing its tasks to be executed if the task is invoked again. |
#set_arg_names | Set the names of the arguments for this task. |
#source | First source from a rule (nil if no sources). |
#timestamp | Timestamp for this task. |
#to_s | Return task name. |
#first_sentence | Get the first sentence in a string. |
#format_trace_flags | Format the trace flags for display. |
#transform_comments | Transform the list of comments as specified by the block and join with the separator. |
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.
# File 'lib/rake/file_creation_task.rb', line 13
def needed? ! File.exist?(name) end
Instance Method Details
#timestamp
::Time stamp for file creation task. This time stamp is earlier than any other time stamp.