Class: ArcREST::Server

Inherits:
Object
  • Object
show all
Includes:
Curlable
Defined in:
lib/arcrest/server.rb

Overview

superclass

Direct Known Subclasses

Catalog, Layer, Service

Constant Summary collapse

ENDPOINT_REGEX =
%r{/arcgis/rest/services/?}i.freeze
BAD_ENDPOINT =
'Invalid ArcGIS endpoint'

Constants included from Curlable

Curlable::RETRIES

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Curlable

#curl_get

Constructor Details

#initialize(url, headers = {}) ⇒ Server

Returns a new instance of Server.



19
20
21
22
23
24
25
26
# File 'lib/arcrest/server.rb', line 19

def initialize(url, headers = {})
  @url = url
  @headers = headers
  validate_endpoint_url
  @server_url = server_url
  @json = json_
  @version = version_
end

Instance Attribute Details

#jsonObject (readonly)

Returns the value of attribute json.



17
18
19
# File 'lib/arcrest/server.rb', line 17

def json
  @json
end

#urlObject (readonly)

Returns the value of attribute url.



17
18
19
# File 'lib/arcrest/server.rb', line 17

def url
  @url
end

#versionObject (readonly)

Returns the value of attribute version.



17
18
19
# File 'lib/arcrest/server.rb', line 17

def version
  @version
end