Class: GeoNamesAPI::Neighbourhood

Inherits:
SingletonEndpoint show all
Defined in:
lib/geonames_api/neighbourhood.rb

Constant Summary collapse

METHOD =
'neighbourhoodJSON'
FIND_PARAMS =
%w(lat lng)

Instance Attribute Summary

Attributes inherited from Entity

#request_params

Instance Method Summary collapse

Methods inherited from SingletonEndpoint

endpoint_returns_list?

Methods inherited from Base

all, find, where

Methods inherited from Entity

#create_attribute, #initialize, #marshal_dump, #marshal_load, #parse_attr, #parse_response, #set_default_type

Constructor Details

This class inherits a constructor from GeoNamesAPI::Entity

Instance Method Details

#hierarchyObject



6
7
8
9
10
# File 'lib/geonames_api/neighbourhood.rb', line 6

def hierarchy
  %w{countryName adminName1 adminName2 city name}.map do |ea|
    @neighbourhood[ea]
  end
end