Class: Arachni::Reactor::Tasks::Delayed

Inherits:
Periodic show all
Defined in:
lib/arachni/reactor/tasks/delayed.rb

Overview

Note:

Time accuracy cannot be guaranteed.

Task occurring after Periodic#interval seconds.

Author:

Instance Attribute Summary

Attributes inherited from Periodic

#interval

Attributes inherited from Base

#owner

Instance Method Summary collapse

Methods inherited from Periodic

#initialize

Methods inherited from Base

#done, #hash, #initialize, #to_proc

Constructor Details

This class inherits a constructor from Arachni::Reactor::Tasks::Periodic

Instance Method Details

#call(*args) ⇒ Object?

Note:

Will call Base#done right after.

Return value of the configured task or nil if it's not time yet.

Returns:

  • (Object, nil)

    Return value of the configured task or nil if it's not time yet.



25
26
27
28
29
# File 'lib/arachni/reactor/tasks/delayed.rb', line 25

def call( *args )
    return if !call?

    call_task( *args ).tap { done }
end