Class: Selenium::DevTools::V85::Tethering
- Inherits:
- 
      Object
      
        - Object
- Selenium::DevTools::V85::Tethering
 
- Defined in:
- lib/selenium/devtools/v85/tethering.rb
Constant Summary collapse
- EVENTS =
- { accepted: 'accepted', }.freeze 
Instance Method Summary collapse
- #bind(port:) ⇒ Object
- 
  
    
      #initialize(devtools)  ⇒ Tethering 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    A new instance of Tethering. 
- #on(event, &block) ⇒ Object
- #unbind(port:) ⇒ Object
Constructor Details
#initialize(devtools) ⇒ Tethering
Returns a new instance of Tethering.
| 29 30 31 | # File 'lib/selenium/devtools/v85/tethering.rb', line 29 def initialize(devtools) @devtools = devtools end | 
Instance Method Details
#bind(port:) ⇒ Object
| 38 39 40 41 | # File 'lib/selenium/devtools/v85/tethering.rb', line 38 def bind(port:) @devtools.send_cmd('Tethering.bind', port: port) end | 
#on(event, &block) ⇒ Object
| 33 34 35 36 | # File 'lib/selenium/devtools/v85/tethering.rb', line 33 def on(event, &block) event = EVENTS[event] if event.is_a?(Symbol) @devtools.callbacks["Tethering.#{event}"] << block end | 
#unbind(port:) ⇒ Object
| 43 44 45 46 | # File 'lib/selenium/devtools/v85/tethering.rb', line 43 def unbind(port:) @devtools.send_cmd('Tethering.unbind', port: port) end |