Class: Rake::FileCreationTask
- Defined in:
- lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/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, #already_invoked, #application, #locations, #order_only_prerequisites, #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_args, #clear_comments, #clear_prerequisites, #comment, #comment=, create_rule, define_task, #enhance, #execute, format_deps, #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.
14 15 16 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/lib/rake/file_creation_task.rb', line 14 def needed? !File.exist?(name) end |