Module: Pwrake::FileTaskAlgorithm

Defined in:
lib/pwrake/task/file_task_algorithm.rb

Instance Method Summary collapse

Instance Method Details

#needed?Boolean

Returns:

  • (Boolean)


5
6
7
# File 'lib/pwrake/task/file_task_algorithm.rb', line 5

def needed?
  !_exist?(name) || out_of_date?(timestamp) || @application.options.build_all
end

#timestampObject

Cache time stamp to reduce load on file system.



10
11
12
13
14
15
16
17
# File 'lib/pwrake/task/file_task_algorithm.rb', line 10

def timestamp
  @file_mtime ||
    if _exist?(name)
      @file_mtime = _mtime(name.to_s)
    else
      Rake::LATE
    end
end