Class: ROGC::WMSClient

Inherits:
Object show all
Defined in:
lib/rogc/wms_client.rb

Instance Method Summary collapse

Constructor Details

#initialize(wms_url) ⇒ WMSClient

Returns a new instance of WMSClient.



9
10
11
12
# File 'lib/rogc/wms_client.rb', line 9

def initialize(wms_url)
  @wms_url = wms_url
  @capabilities = nil
end

Instance Method Details

#capabilitiesObject



14
15
16
17
18
19
20
21
# File 'lib/rogc/wms_client.rb', line 14

def capabilities
  return @capabilities if @capabilities
  doc = open(build_wms_url)
  format = ROGC::Formats::WMSCapabilities::Base.new

  @capabilities = format.read(doc)
  @capabilities
end