Sha256: 83723a3938e962bd0bfdeef422dad4230cf86a9334d28f7b9fc90d3a884ec975

Contents?: true

Size: 466 Bytes

Versions: 10

Compression:

Stored size: 466 Bytes

Contents

require 'rubygems' if RUBY_VERSION < '1.9'
require 'rake/tasklib'

module Rake

  # A task whose behaviour depends on a FileTask
  class FileTaskAlias < Task

    attr_accessor :target

    def self.define_task( name, target, &block )
      alias_task = super( { name => [] }, &block )
      alias_task.target = target
      alias_task.prerequisites.unshift( target )
      alias_task
    end

    def needed?
      Rake::Task[ @target ].needed?
    end

  end

end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
rake-builder-0.7.0 lib/rake/file_task_alias.rb
rake-builder-0.0.19 lib/rake/file_task_alias.rb
rake-builder-0.0.18 lib/rake/file_task_alias.rb
rake-builder-0.0.17 lib/rake/file_task_alias.rb
rake-builder-0.0.16 lib/rake/file_task_alias.rb
rake-builder-0.0.15 lib/rake/file_task_alias.rb
rake-builder-0.0.14 lib/rake/file_task_alias.rb
rake-builder-0.0.13 lib/rake/file_task_alias.rb
rake-builder-0.0.12 lib/rake/file_task_alias.rb
rake-builder-0.0.11 lib/rake/file_task_alias.rb