Module: UberDoc

Defined in:
lib/uberdoc/task.rb,
lib/uberdoc/utils.rb,
lib/uberdoc/options.rb,
lib/uberdoc/tasks/doctor_task.rb,
lib/uberdoc/tasks/doxygen_task.rb,
lib/uberdoc/tasks/generate_task.rb

Defined Under Namespace

Modules: Options, Util Classes: DoctorTask, DoxygenTask, Generate, Task

Class Method Summary collapse

Class Method Details

.find_all_tasksObject

Returns a list of all known tasks



35
36
37
38
39
40
41
42
43
44
45
# 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) ⇒ Object

Finds all appropriate tasks and performs them if necessary



62
63
64
# File 'lib/uberdoc/task.rb', line 62

def self.find_and_perform_tasks(options)
    self.perform_tasks(self.find_all_tasks, options)
end

.perform_tasks(tasks, options) ⇒ Object

Performs the specified tasks



50
51
52
53
54
55
56
57
# File 'lib/uberdoc/task.rb', line 50

def self.perform_tasks(tasks, options)
    tasks.each do |task|
        if task.should_run?(options)
            new_task = task.new(options)
            new_task.perform
        end
    end
end