Class: Rake::FileTask
Overview
A FileTask is a task that includes time based dependencies. If any of a FileTask’s prerequisites have a timestamp that is later than the file represented by this task, then the file must be rebuilt (using the supplied actions).
Direct Known Subclasses
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, or if its time stamp is out of date.
-
#timestamp ⇒ Object
Time stamp for file 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, or if its time stamp is out of date.
398 399 400 401 402 |
# File 'lib/rake.rb', line 398 def needed? return true unless File.exist?(name) return true if out_of_date?() false end |