Class: Coelacanth::Client::Base
- Inherits:
-
Object
- Object
- Coelacanth::Client::Base
show all
- Defined in:
- lib/coelacanth/client/base.rb
Overview
Instance Method Summary
collapse
Constructor Details
#initialize(url, config = Coelacanth.config) ⇒ Base
Returns a new instance of Base.
8
9
10
11
12
13
|
# File 'lib/coelacanth/client/base.rb', line 8
def initialize(url, config = Coelacanth.config)
@validator = Coelacanth::Validator.new
raise URI::InvalidURIError unless @validator.valid_url?(url)
@config = config
@url = url
end
|
Instance Method Details
#client ⇒ Object
15
16
17
|
# File 'lib/coelacanth/client/base.rb', line 15
def client
@config.read("client")
end
|
#get_response(url = nil) ⇒ Object
19
20
21
|
# File 'lib/coelacanth/client/base.rb', line 19
def get_response(url = nil)
raise "Must be implemented in subclass"
end
|
#get_screenshot ⇒ Object
23
24
25
|
# File 'lib/coelacanth/client/base.rb', line 23
def get_screenshot
raise "Must be implemented in subclass"
end
|