Class: RakeWrapper

Inherits:
Object
  • Object
show all
Defined in:
lib/rake/ant/tasks/raketasks.rb

Instance Method Summary collapse

Instance Method Details

#execute(*args) ⇒ Object



17
18
19
# File 'lib/rake/ant/tasks/raketasks.rb', line 17

def execute(*args)
  load_tasks(*args).top_level
end

#import(*args) ⇒ Object



25
26
27
28
# File 'lib/rake/ant/tasks/raketasks.rb', line 25

def import(*args)
  ant = Ant.new
  load_tasks(*args).tasks.each { |rake_task| ant.add_target rake_task }
end

#invoke_task(task) ⇒ Object



21
22
23
# File 'lib/rake/ant/tasks/raketasks.rb', line 21

def invoke_task(task)
  Rake.application[task].invoke
end

#load_tasks(*args) ⇒ Object



6
7
8
9
10
11
12
13
14
15
# File 'lib/rake/ant/tasks/raketasks.rb', line 6

def load_tasks(*args)
  # FIXME: Use our arguments (this sucks...let's submit a patch for Rake
  ARGV.clear
  ARGV.concat args

  Rake.application.tap do |application|
    application.init
    application.load_rakefile
  end
end