Sha256: 60edc1201c3f8047a93881661c02dc451a354fed4e7f2e945c9c3545fd1e238d
Contents?: true
Size: 453 Bytes
Versions: 2
Compression:
Stored size: 453 Bytes
Contents
require 'rake/tasklib' def renametask(name=:rename, *args, &block) Albacore::RenameTask.new(name, *args, &block) end module Albacore class RenameTask < Albacore::AlbacoreTask attr_accessor :actual_name, :target_name def execute(task_args) @block.call(self, *task_args) unless @block.nil? if (@actual_name.nil? || @target_name.nil?) fail else File.rename(@actual_name, @target_name) end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
albacore-0.0.9 | lib/rake/renametask.rb |
albacore-0.0.8 | lib/rake/renametask.rb |