class Observed::MutableTask
Public Class Methods
new(current_task)
click to toggle source
# File lib/observed/task.rb, line 27 def initialize(current_task) @current_task = current_task @mutex = Mutex.new end
Public Instance Methods
now(data={}, options=nil) { |data, (options2 || options)| ... }
click to toggle source
# File lib/observed/task.rb, line 31 def now(data={}, options=nil) @current_task.now(data, options) do |data, options2| yield data, (options2 || options) if block_given? end end
then(*tasks)
click to toggle source
# File lib/observed/task.rb, line 36 def then(*tasks) @mutex.synchronize do @current_task = @current_task.then(*tasks) end self end