Hello everybody, I'm learning Ruby, coming from Java and Python.
I thought a good first project would be to duplicate a script I've
previously done in Python, which takes a list of stock symbols and
does an http GET from google finance to pull the current stock price.
I started out by looking at the net.http library. However the
documentation isn't super descriptive as far as usage:
This was a bit surprising to me coming from Python where the docs are
pretty good. Bascially, I am expecting to do a get and ruby returns a
string of the page html.
Is there another place documentation wise I should be looking? Or do I
just grab the interpreter and start experimenting? That's fine also,
but if there is a better documentation source I thought I'd ask.
Thanks!
···
--
A musician must make music, an artist must paint, a poet must write,
if he is to be ultimately at peace with himself.
- Abraham Maslow
You should generally look for the documentation of the top level classes
(in this case Net::HTTP or Net). That's were you'll find explanations,
usage examples etc.
It seems to work like a charm. The one nitpick I have so far is that
my terminal is set to 160 columns but it truncates the output lines to
170 characters; so there are 7 characters plus '...' sitting all alone
on a line sometimes.
For some reason I don't see your announcement on ruby-forum.com ...
···
On Sat, Mar 17, 2012 at 7:02 PM, David Heitzman <rubyinfo@aptifuge.com> wrote:
I just created a new gem to provide a command line interface for searches on
rubygems.org.