Module: Rake::TaskManager

Defined in:
lib/bow/rake.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#last_flowObject

Returns the value of attribute last_flow.



29
30
31
# File 'lib/bow/rake.rb', line 29

def last_flow
  @last_flow
end

Instance Method Details

#get_flow(_task) ⇒ Object

Return current flow, clearing it in the process.



41
42
43
44
45
46
# File 'lib/bow/rake.rb', line 41

def get_flow(_task)
  @last_flow ||= nil
  flow = @last_flow&.first
  @last_flow = nil
  flow
end

#intern(task_class, task_name) ⇒ Object

Lookup a task. Return an existing task if found, otherwise create a task of the current type.



33
34
35
36
37
38
# File 'lib/bow/rake.rb', line 33

def intern(task_class, task_name)
  @tasks[task_name.to_s] ||= task_class.new(task_name, self)
  task = @tasks[task_name.to_s]
  task.unpack_flow(get_flow(task))
  task
end