From: Sven Schott Date: 2010-06-02T15:11:39+09:00 Subject: Re: Parsing geonames --000e0cd70a385d75f3048805f6cd Content-Type: text/plain; charset=ISO-8859-1 Have you tried just calling the name of the instance var? Sometimes nice developer set up easy setters and getters in their implementations. e.g. places_nearby[0].country_code Just a thought. What are you trying that's failing? Have you looked through the docs at http://www.tbcn.ca/ruby_geonames On Wed, Jun 2, 2010 at 3:57 PM, 12 34 wrote: > A Ruby newbie having trouble getting results back from geonames > > #!/usr/bin/env ruby > require "rubygems" > require 'geonames' > > places_nearby = Geonames::WebService.find_nearby_place_name > 41.505928,-81.594582 > p places_nearby # --> [# @country_code="US", @feature_code_name=nil, @elevation=nil, > @distance=0.4495, @alternate_names=nil, @feature_code="PPLX", > @population=nil, @geoname_id="5161005", @longitude=-81.5981817, > @feature_class_name=nil, @country_name="United States", @name="Little > Italy", @latitude=41.5089406, @feature_class="P">] > > How do I get any of the values, e.g., country_name? places_nearby is a > local variable. > > Thank you in advance for help. I've tried several things, but can't > figure it out. > -- > Posted via http://www.ruby-forum.com/. > > --000e0cd70a385d75f3048805f6cd--