Class: Origen::Application::RakeLoader
- Includes:
- Rake::DSL
- Defined in:
- lib/origen/application.rb
Overview
A simple class to load all rake tasks available to an application, a class is used here to avoid collision with the Rake namespace method
Instance Method Summary collapse
Instance Method Details
#load_tasks ⇒ Object
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 |
# File 'lib/origen/application.rb', line 78 def load_tasks $VERBOSE = nil # Don't care about world writable dir warnings and the like require 'colored' # Load all Origen tasks first Dir.glob("#{Origen.top}/lib/tasks/*.rake").sort.each do |file| load file end # Now the application's own tasks if Origen.app.origen_core? Dir.glob("#{Origen.root}/lib/tasks/private/*.rake").sort.each do |file| load file end else Dir.glob("#{Origen.root}/lib/tasks/*.rake").sort.each do |file| load file end end # Finally those that the plugin's have given us ([Origen.app] + Origen.app.plugins).each do |plugin| namespace plugin.name do Dir.glob("#{plugin.root}/lib/tasks/shared/*.rake").sort.each do |file| load file end end end end |