Class: Crabfarm::ForkedNavigator
- Inherits:
-
Delegator
- Object
- Delegator
- Crabfarm::ForkedNavigator
- Defined in:
- lib/crabfarm/forked_navigator.rb
Instance Method Summary collapse
- #__getobj__ ⇒ Object
- #__setobj__(obj) ⇒ Object
- #browser ⇒ Object
-
#initialize(_context, _parent, _browser_name, _mutex) ⇒ ForkedNavigator
constructor
A new instance of ForkedNavigator.
- #synchronize ⇒ Object
Constructor Details
#initialize(_context, _parent, _browser_name, _mutex) ⇒ ForkedNavigator
Returns a new instance of ForkedNavigator.
4 5 6 7 8 9 10 11 |
# File 'lib/crabfarm/forked_navigator.rb', line 4 def initialize(_context, _parent, _browser_name, _mutex) @context = _context @parent = _parent @browser_name = _browser_name @mutex = _mutex super @parent end |
Instance Method Details
#__getobj__ ⇒ Object
23 24 25 |
# File 'lib/crabfarm/forked_navigator.rb', line 23 def __getobj__ @parent end |
#__setobj__(obj) ⇒ Object
27 28 29 |
# File 'lib/crabfarm/forked_navigator.rb', line 27 def __setobj__(obj) @parent = obj end |
#browser ⇒ Object
13 14 15 |
# File 'lib/crabfarm/forked_navigator.rb', line 13 def browser @browser ||= @context.pool.driver(@browser_name) end |
#synchronize ⇒ Object
17 18 19 20 21 |
# File 'lib/crabfarm/forked_navigator.rb', line 17 def synchronize @mutex.synchronize { yield } end |