Module: MiGA::Project::Result

Includes:
Common::WithResult, Base
Included in:
MiGA::Project
Defined in:
lib/miga/project/result.rb

Overview

Helper module including specific functions to add project results.

Instance Method Summary collapse

Methods included from Common::WithResult

#add_result, #each_result, #get_result, #next_task, #recalculate_tasks, #result, #result_dirs, #results

Instance Method Details

#ignore_task?(task) ⇒ Boolean

Is this task to be bypassed?

Returns:

  • (Boolean)


33
34
35
36
37
38
39
# File 'lib/miga/project/result.rb', line 33

def ignore_task?(task)
  opt = "run_#{task}"
  return true if [opt] == false
  return true if option?(opt) && option(opt) == false

  !clade? && @@INCLADE_TASKS.include?(task) && [opt] != true
end

#inactivate!(reason = nil) ⇒ Object

Do nothing, only to comply with MiGA::Common::WithResult



28
29
# File 'lib/miga/project/result.rb', line 28

def inactivate!(reason = nil)
end

#next_distances(save = true) ⇒ Object

Get the next distances task, saving intermediate results if save. Returns a Symbol.



44
45
46
# File 'lib/miga/project/result.rb', line 44

def next_distances(save = true)
  next_task(@@DISTANCE_TASKS, save)
end

#next_inclade(save = true) ⇒ Object

Get the next inclade task, saving intermediate results if save. Returns a Symbol.



51
52
53
# File 'lib/miga/project/result.rb', line 51

def next_inclade(save = true)
  next_task(@@INCLADE_TASKS, save)
end

#projectObject

Return itself, to simplify modules



22
23
24
# File 'lib/miga/project/result.rb', line 22

def project
  self
end

#result_baseObject

Return the basename for results



16
17
18
# File 'lib/miga/project/result.rb', line 16

def result_base
  'miga-project'
end