Class: SoraGeocoding::Url

Inherits:
Base
  • Object
show all
Defined in:
lib/sora_geocoding/url.rb

Overview

generate url

Constant Summary collapse

BASE_YAHOO_URL =
'https://map.yahooapis.jp/geocode/V1/geoCoder'.freeze
BASE_GEOCODING_URL =
'https://www.geocoding.jp/api/'.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#configuration, #handle, #raise_error

Constructor Details

#initialize(query) ⇒ Url

Returns a new instance of Url.



14
15
16
17
18
# File 'lib/sora_geocoding/url.rb', line 14

def initialize(query)
  @yahoo_appid = configuration.yahoo_appid
  @site = configuration.site
  @query = query
end

Instance Attribute Details

#site ⇒ Object

Returns the value of attribute site.



9
10
11
# File 'lib/sora_geocoding/url.rb', line 9

def site
  @site
end

Instance Method Details

#get ⇒ Object



20
21
22
23
# File 'lib/sora_geocoding/url.rb', line 20

def get
  switch_site
  select
end