Class: WebLoader::Drivers::BaseDriver

Inherits:
Object
  • Object
show all
Defined in:
lib/web_loader/drivers/base_driver.rb

Direct Known Subclasses

HttpDriver, SeleniumDriver

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeBaseDriver

Returns a new instance of BaseDriver.



4
5
6
7
# File 'lib/web_loader/drivers/base_driver.rb', line 4

def initialize
  @user_agent = nil
  @binary = false
end

Instance Attribute Details

#binaryObject

Returns the value of attribute binary.



9
10
11
# File 'lib/web_loader/drivers/base_driver.rb', line 9

def binary
  @binary
end

#user_agentObject

Returns the value of attribute user_agent.



9
10
11
# File 'lib/web_loader/drivers/base_driver.rb', line 9

def user_agent
  @user_agent
end

Instance Method Details

#fetch(url) ⇒ Object

Raises:



11
12
13
# File 'lib/web_loader/drivers/base_driver.rb', line 11

def fetch(url)
  raise NotImplementedError, 'Subclasses must implement the fetch method'
end