Class: Geokit::NetAdapter::Typhoeus

Inherits:
Object
  • Object
show all
Defined in:
lib/geokit/net_adapter/typhoeus.rb

Class Method Summary collapse

Class Method Details

.do_get(url) ⇒ Object


4
5
6
7
# File 'lib/geokit/net_adapter/typhoeus.rb', line 4

def self.do_get(url)
  headers = Geokit::Geocoders.useragent ? {'User-Agent' => Geokit::Geocoders.useragent} : {}
  ::Typhoeus.get(url.to_s, :headers => headers)
end

.success?(response) ⇒ Boolean

Returns:

  • (Boolean)

9
10
11
# File 'lib/geokit/net_adapter/typhoeus.rb', line 9

def self.success?(response)
  response.success?
end