module UberDoc
Public Class Methods
find_all_tasks()
click to toggle source
Returns a list of all known tasks
# File lib/uberdoc/task.rb, line 35 def self.find_all_tasks $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), 'tasks')) Dir["#{File.dirname(__FILE__)}/tasks/**/*_task.rb"].each do |task| require task end Task.known_tasks end
find_and_perform_tasks(options)
click to toggle source
Finds all appropriate tasks and performs them if necessary
# File lib/uberdoc/task.rb, line 69 def self.find_and_perform_tasks(options) self.perform_tasks(self.find_all_tasks, options) end
perform_tasks(tasks, options)
click to toggle source
Performs the specified tasks
# File lib/uberdoc/task.rb, line 50 def self.perform_tasks(tasks, options) performed = false tasks.each do |task| if task.should_run?(options) new_task = task.new(options) new_task.perform performed = true end end performed end