I would like to add path to FileTask to make it easier to create file tasks
file 'test.txt' do |t|
t.path.open('w') do |file|
file.puts "It works"
end
end
as opposed to
file 'test.txt' do |t|
File.open( t.name) do |file| ...
class FileTask < Task
+ attr_reader :path
+
+ def initialize(*args)
+ super
+ @path = Pathname.new(name)
+ end
+
+
The patch also changes directory to use Pathname.ascend so pathname objects
can be used. It passes all tests
root = Pathname.getwd
tmp = root + 'tmp'
directory tmp
pathname.patch
Description: Binary data
_______________________________________________ Rake-devel mailing list [email protected] http://rubyforge.org/mailman/listinfo/rake-devel
