Class: Arachni::BrowserCluster::Jobs::BrowserProvider
- Inherits:
-
Arachni::BrowserCluster::Job
- Object
- Arachni::BrowserCluster::Job
- Arachni::BrowserCluster::Jobs::BrowserProvider
- Defined in:
- lib/arachni/browser_cluster/jobs/browser_provider.rb
Overview
Works together with Arachni::BrowserCluster#with_browser to provide the callback for this job with the Arachni::Browser assigned to this job.
Instance Attribute Summary
Attributes inherited from Arachni::BrowserCluster::Job
#args, #browser, #forwarder, #time
Instance Method Summary collapse
-
#initialize(*args) ⇒ BrowserProvider
constructor
A new instance of BrowserProvider.
- #run ⇒ Object
- #to_s ⇒ Object (also: #inspect)
Methods inherited from Arachni::BrowserCluster::Job
#==, #clean_copy, #configure_and_run, #dup, #forward, #forward_as, #hash, #id, #never_ending=, #never_ending?, #save_result, #timed_out!, #timed_out?
Constructor Details
#initialize(*args) ⇒ BrowserProvider
Returns a new instance of BrowserProvider.
19 20 21 22 23 |
# File 'lib/arachni/browser_cluster/jobs/browser_provider.rb', line 19 def initialize( *args ) super() @args = args end |
Instance Method Details
#run ⇒ Object
25 26 27 |
# File 'lib/arachni/browser_cluster/jobs/browser_provider.rb', line 25 def run browser.master.callback_for( self ).call *[browser, @args].flatten.compact end |
#to_s ⇒ Object Also known as: inspect
29 30 31 32 33 |
# File 'lib/arachni/browser_cluster/jobs/browser_provider.rb', line 29 def to_s "#<#{self.class}:#{object_id} " << "callback=#{browser.master.callback_for( self ) if browser && browser.master} " << "time=#{@time} timed_out=#{timed_out?}>" end |