Module: Nominatim

Defined in:
lib/nominatim.rb,
lib/nominatim/place.rb,
lib/nominatim/point.rb,
lib/nominatim/client.rb,
lib/nominatim/search.rb,
lib/nominatim/address.rb,
lib/nominatim/polygon.rb,
lib/nominatim/reverse.rb,
lib/nominatim/version.rb,
lib/nominatim/configuration.rb,
lib/nominatim/response/parse_json.rb

Defined Under Namespace

Modules: Response Classes: Address, Client, Configuration, Place, Point, Polygon, Reverse, Search

Constant Summary collapse

VERSION =
"0.0.7"

Class Method Summary collapse

Class Method Details

.configNominatim::Configuration



29
30
31
# File 'lib/nominatim.rb', line 29

def self.config
  @config ||= Configuration.new
end

.configure(&block) ⇒ Object



33
34
35
# File 'lib/nominatim.rb', line 33

def self.configure(&block)
  config.configure &block
end

.reverse(lat = nil, lon = nil) ⇒ Nominatim::Reverse

Returns:



22
23
24
25
26
# File 'lib/nominatim.rb', line 22

def self.reverse(lat = nil, lon = nil)
  search = Nominatim::Reverse.new
  search.lat(lat).lon(lon) if lat && lon
  search
end

.search(q = nil) ⇒ Nominatim::Search

Returns:



15
16
17
18
19
# File 'lib/nominatim.rb', line 15

def self.search(q = nil)
  search = Nominatim::Search.new
  search.query(q) if q
  search
end