module GeoGuard
Constants
- VERSION
Attributes
configuration[W]
Public Class Methods
configuration()
click to toggle source
# File lib/geoguard.rb, line 10 def self.configuration @configuration ||= Configuration.new end
configure() { |configuration| ... }
click to toggle source
# File lib/geoguard.rb, line 14 def self.configure yield(configuration) if block_given? end
update(cache_headers: {})
click to toggle source
# File lib/geoguard.rb, line 18 def self.update(cache_headers: {}) path = "/v1/update/#{configuration.format}/geostream" headers = { 'X-Geostream-License-Key' => configuration.license, 'X-Geostream-Client-Id' => configuration.client_id }.merge(cache_headers) response = RestClient.get("#{configuration.host}#{path}", headers) response.body if response.code >= 200 && response.code < 300 end