WHat's your other language? Erlang?


On Thu, Feb 6, 2014 at 12:13 AM, BeeRich <beerich / gmail.com> wrote:

> Thanks for the reply.
>
> Turns out I wasn't aware of the structure of the inspect method.  The data
> is inside the @data.  That text threw me off as it doesn't have a proper
> structure.
>
> res = Geocoder.search(i).first
>
> ...gets the job done.
>
> Ya hashes from my other language are called maps.  Been writing them for
> over a decade.  This inspect method completely stumped me.
>
> Cheers
>
>
> On Feb 6, 2014, at 12:58 AM, Carlo E. Prelz <fluido / fluido.as> wrote:
>
> > Quoting BeeRich (beerich / gmail.com):
> >
> >> Been returned an array of a single item that's really confusing.
> >> Any input as to how I tackle this thing would be truly appreciated.
> >
> > From your output, it appears that the object includes a hash called
> > 'data'. If you use pp, you can have a pretty-print of it:
> >
> > require 'pp'
> > pp <object>.data
> >
> > From what I see of your output, you should be able to get lat and long
> > with this syntax:
> >
> > <object>.data['geometry']['location']['lat']
> > <object>.data['geometry']['location']['lng']
> >
> > but you need to test that.
> >
> > If you do not know exactly what a hash is, you can type
> >
> > ri Hash
> >
> > on your terminal.
> >
> > Carlo
>
>