Trouble with strings..

C

Chris Rio

Mornin' folks - I'm trying to get my head around ruby, writing a few
scripts. This one is meant to head off to a webpage and grab a big
table, which it does. The problem is that I don't know how to
specifically grab that entire table, but I can manage to grab the
content based on classes.

Doing it this way however, I end up not grabbing some of the table tags
- so I need to replace them:

http://pastie.textmate.org/225090

All of the methods I have used thus far end up parsing that string, even
though it's quoted up and I want it to be treated purely as a string.
Ruby throws exceptions at me as it tries to parse a string I just want
dumped into the text file in its entirety.

Any thoughts? :)

Cheers folks

Chris R
 
C

Chris Rio

Chris said:
Mornin' folks - I'm trying to get my head around ruby, writing a few
scripts. This one is meant to head off to a webpage and grab a big
table, which it does. The problem is that I don't know how to
specifically grab that entire table, but I can manage to grab the
content based on classes.

Doing it this way however, I end up not grabbing some of the table tags
- so I need to replace them:

http://pastie.textmate.org/225090

All of the methods I have used thus far end up parsing that string, even
though it's quoted up and I want it to be treated purely as a string.
Ruby throws exceptions at me as it tries to parse a string I just want
dumped into the text file in its entirety.

Any thoughts? :)

Cheers folks

Chris R

Figured it out. aFile.puts "string" works like a charm.

What a dumby :p
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,071
Latest member
MetabolicSolutionsKeto

Latest Threads

Top