Module: Rake::Subproject::TaskManager
- Included in:
- Application
- Defined in:
- lib/rake/subproject/task_manager.rb
Overview
:nodoc: all
Instance Method Summary collapse
Instance Method Details
#[](task_name, scopes = nil) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/rake/subproject/task_manager.rb', line 13 def [](task_name, scopes=nil) self.lookup(task_name, scopes) or runners.each do |dir, subproject| task_name.match /^#{dir}[\/\:](.*)/ do |md| # Here, we need a remote task class that can receive the return Rake::Task.define_task task_name do |t, args| subproject.invoke_task(md[1], args) end end end super end |
#define_subproject(path) ⇒ Object
4 5 6 7 8 9 10 11 |
# File 'lib/rake/subproject/task_manager.rb', line 4 def define_subproject(path) raise "Subproject path '#{path}' does not exist" unless File.exist?(path) directory = File.directory?(path) ? path : File.dirname(path) return if runners[path] runners[directory] = Rake::Subproject::TaskRunner.new(path) end |