-
Notifications
You must be signed in to change notification settings - Fork 41
Home
Welcome to the ruby-geonames wiki!
Look at [this ruby-forum discussion[http://www.ruby-forum.com/topic/210822]] for hints on how to use this gem.
Try
places = Geonames::WebService.find_nearby_place_name(41.505928, -81.594582)
=> [#<Geonames::Topon×ばつ000000027dd158 @name="Little Italy",
@alternate_names=nil, @latitude=41.5089406, @longitude=-81.5981817,
@geoname_id="5161005", @country_code="US", @country_name="United
States", @feature_class="P", @feature_code="PPLX",
@feature_class_name=nil, @feature_code_name=nil, @population=nil,
@elevation=nil, @distance=0.4495>]
places.first.country_name
=> "United States"
and
places_nearby.class
places_nearby0
places_nearby.size
places_nearby0 .class
places_nearby0 .methods
places_nearby.each_with_index{|x,i| puts"#{i}) #{x}"}