Sha256: 0f39cdb3bd52668bbabd424016a39b9323fca4a924e6626b33397b21b4fd93b1

Contents?: true

Size: 680 Bytes

Versions: 5

Compression:

Stored size: 680 Bytes

Contents

# encoding: utf-8
require 'arcserver/rest/map_server'
require 'arcserver/soap/map_server'
require 'forwardable'

module ArcServer
  class MapServer
    include UrlHelper
    extend  Forwardable

    attr_reader    :soap_service
    def_delegators :soap_service, :get_default_map_name, :get_legend_info
    
    attr_reader    :rest_service
    def_delegators :rest_service, :export

    def initialize(url, opts = {})
      raise Exception, "#{url} is not a valid map server url" unless map_server?(url)

      @soap_service = opts[:soap_service] || SOAP::MapServer.new(to_soap(url))
      @rest_service = opts[:rest_service] || REST::MapServer.new(to_rest(url))
    end
  end
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
colincasey-arcserver.rb-0.0.2 lib/arcserver/map_server.rb
arcserver.rb-0.1.2 lib/arcserver/map_server.rb
arcserver.rb-0.1.1 lib/arcserver/map_server.rb
arcserver.rb-0.1.0 lib/arcserver/map_server.rb
arcserver.rb-0.0.2 lib/arcserver/map_server.rb