Ruby Geocoder [Rails] - How to Traverse this Result <p>I just installed <a href="http://www.rubygeocoder.com" rel="nofollow" title="Ruby Geocoder">Ruby Geocoder</a> and I am trying to traverse the <code>Geocoder::Result</code>, but keep coming up short. I am in rails console, and have used the following:</p> <p><code>s = Geocoder.search("90210")</code></p> <p>Which returns the following:</p> <p><code>[#&lt;Geocoder::Result::Google:0x007ff295579ad8 @data={"address_components"=&gt;[{"long_name"=&gt;"90210", "short_name"=&gt;"90210", "types"=&gt;["postal_code"]}, {"long_name"=&gt;"Beverly Hills", "short_name"=&gt;"Beverly Hills", "types"=&gt;["locality", "political"]}, {"long_name"=&gt;"Los Angeles", "short_name"=&gt;"Los Angeles", "types"=&gt;["administrative_area_level_2", "political"]}, {"long_name"=&gt;"California", "short_name"=&gt;"CA", "types"=&gt;["administrative_area_level_1", "political"]}, {"long_name"=&gt;"United States", "short_name"=&gt;"US", "types"=&gt;["country", "political"]}], "formatted_address"=&gt;"Beverly Hills, CA 90210, USA", "geometry"=&gt;{"bounds"=&gt;{"northeast"=&gt;{"lat"=&gt;34.1354771, "lng"=&gt;-118.3867129}, "southwest"=&gt;{"lat"=&gt;34.065094, "lng"=&gt;-118.4423781}}, "location"=&gt;{"lat"=&gt;34.1030032, "lng"=&gt;-118.4104684}, "location_type"=&gt;"APPROXIMATE", "viewport"=&gt;{"northeast"=&gt;{"lat"=&gt;34.1354771, "lng"=&gt;-118.3867129}, "southwest"=&gt;{"lat"=&gt;34.065094, "lng"=&gt;-118.4423781}}}, "types"=&gt;["postal_code"]}, @cache_hit=nil&gt;]</code></p> <p>How can I access a specific part of the Result? I have tried the following:</p> <p><code>s.result.city</code>, <code>result.city</code>, <code>s.data</code>?? But none of these work. Any ideas would be great.</p> <p>Thanks!</p>